Skip to content

Create a OneDrive folder ​

Creates a folder unless it already exists — a retry creates no duplicate.

This node makes sure a folder exists in the OneDrive of the member running the workflow and returns its id: it creates it unless a folder with the same name already exists in the parent. Use it to prepare a destination per client, per project or per month before Upload to OneDrive.

It needs the OneDrive access of a Microsoft account, shown as the Files capability in Connections. See Microsoft. For a folder in a SharePoint library, use the SharePoint node (resource Folder).

At a glance ​

  • Type: onedrive.create_folder · version 1
  • Category: Actions
  • Kind: Step — one stage of a run
  • Effect: Writes outside (external_write) — writes outside Mankomail; described instead of performed during a test run
  • Needs a carrier email: No
  • Connection: Microsoft (capability files)
  • Inputs: main
  • Outputs: main

Connection ​

This node needs a Microsoft connection with the files capability granted.

Parameters ​

credential ​

Microsoft account — The account whose OneDrive is used. Connect it from Connections; the token is resolved by the server and appears nowhere.

  • Type: Connection (credential)
  • Required: No
  • Default: "" (empty)

parent ​

Parent folder — Where to create the folder. Left empty: the root of your OneDrive.

  • Type: Remote resource (resourceLocator)
  • Required: No
  • Default: {"mode":"id","value":""}
  • Ways to choose: pick from a list, type an ID, paste a URL (onedrive.folder)
  • Listed with the connection in: credential

name ​

Folder name — Accepts {{ }} expressions: Clients/{{ email.from.email }} is not a tree, it is one single name.

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 255 characters at most
  • Example: Quotes {{ email.from.name }}
  • Expressions: {{ }} accepted

Outputs ​

  • main

Data produced ​

What this node adds to the run data, and how to read it in an expression. <step> stands for the step key: the node name turned into an identifier (see Data and expressions).

  • {{ data.<step>.folder }} — object { id, name, mime, size, webUrl, folderId }. The folder created, or the one that already existed under that name. mime is inode/directory, size is 0, webUrl the link that opens it in OneDrive, folderId the id of its parent (empty for the root).
  • {{ data.<step>.folder.id }} — string. The folder id, to plug into the folder field of a later OneDrive step (id mode).
  • {{ data.<step>.created }} — boolean. true when this step created the folder, false when a folder with that name already existed in the parent and was reused.
  • {{ data.<step>.summary }} — string. A readable sentence saying whether the folder was created or already there.
  • {{ data.<step>.simulated }} — boolean. true when the step ran in a test run and the write was only described — the same field as on the Google and Outlook nodes. Always false for a read.

Example ​

Each new client gets a folder under Clients. The node is named Client folder:

parent: (list mode) Clients
name: {{ email.from.name }}

The first email from Jane Smith creates the folder:

json
{
  "folder": {
    "id": "01XYZ…",
    "name": "Jane Smith",
    "mime": "inode/directory",
    "size": 0,
    "webUrl": "https://contoso-my.sharepoint.com/personal/…/Clients/Jane%20Smith",
    "folderId": "01PARENT…"
  },
  "created": true
}

Later emails find the same folder with created: false, and the upload step uses {{ data.client_folder.folder.id }}.

Tips ​

  • Replayable. The match is on the exact folder name in the parent: a replay of the step, or another run asking for the same name, reuses the folder instead of creating a numbered copy.
  • One name, not a path. Folder name is a single name: Clients/{{ email.from.email }} does not create two levels. Chain two steps to build a tree.
  • Parent folder. Left empty, the OneDrive root. Pick it from the list, type an item id, or paste a OneDrive folder URL; sharing links cannot be resolved and fail with microsoft.rejected.
  • Test runs. In test runs nothing is created: the step returns a folder with an id starting with simulated:, an empty webUrl and created: true.
  • Errors. credential.capability_missing: OneDrive is not connected for the member running the workflow. microsoft.access_denied: reconnect the account. microsoft.not_found: the parent folder does not exist. microsoft.rejected: OneDrive refused the name. microsoft.unavailable is retried automatically. See Error handling.