Skip to content

Drive — create a folder ​

Creates a Google Drive folder unless one with the same name already exists under the same parent, and returns its id for the rest of the workflow.

This node makes sure a Google Drive folder exists and returns its id: it creates the folder unless a folder with the same name already exists under the same parent, in which case it reuses it. It is the normal way to give Drive — upload a file a destination, for instance one folder per client or per month.

It needs the Google Drive access of a Google account, shown as the Files capability in Connections. See Google. The folder is created in the Drive of the member running the workflow.

The access requested is drive.file, which only lets the app see what it created. A folder created by this node is therefore always visible to the other Drive nodes, unlike a folder created by hand in the browser.

At a glance ​

  • Type: google_drive.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: Google (capability drive)
  • Inputs: main
  • Outputs: main

Connection ​

This node needs a Google connection with the drive capability granted.

Parameters ​

credential ​

Google account — The account holding Google Drive access. Connect it once in Connections; the workflow always runs with the account of the member running it.

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

name ​

Folder name — Accepts {{ }} expressions: {{ email.from.name }} for one folder per client. A folder with the same name under the same parent is reused, never duplicated.

  • Type: Text (string)
  • Required: Yes
  • Default: "" (empty)
  • 200 characters at most
  • Example: Invoices 2026
  • Expressions: {{ }} accepted

parent ​

Inside folder — Left empty, the folder is created at the Drive root.

  • Type: Remote resource (resourceLocator)
  • Required: No
  • Ways to choose: pick from a list, type an ID, paste a URL (drive.folder)
  • Listed with the connection in: credential

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, webViewLink?, folderId? }. The folder created, or the one that already existed under the same name. mime is application/vnd.google-apps.folder, webViewLink the link that opens it in Google Drive, folderId the id of its parent.
  • {{ data.<step>.folder.id }} — string. The folder id, to plug into the folder field of a later Drive step (id mode).
  • {{ data.<step>.created }} — boolean. true when the folder was created by this step, false when a folder with the same name already existed under the same parent and was reused.
  • {{ data.<step>.simulated }} — boolean. true in a test run: nothing was created and the id starts with simulated-.
  • {{ data.<step>.summary }} — string. A readable sentence saying whether the folder was created or found.

Example ​

Each client gets a folder under a Clients folder created once by the app. The node is named Client folder:

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

The first email from Jane Smith creates the folder; the step data reads:

json
{
  "folder": {
    "id": "1TxK9…",
    "name": "Jane Smith",
    "mime": "application/vnd.google-apps.folder",
    "webViewLink": "https://drive.google.com/drive/folders/1TxK9…",
    "folderId": "1AbC2…"
  },
  "created": true,
  "simulated": false
}

The next emails from the same sender find the folder again, with created: false. The upload step that follows uses {{ data.client_folder.folder.id }} as its destination folder.

Tips ​

  • One folder per name. The match is on the exact name under the same parent, among folders that are not in the trash. Two runs that ask for the same folder end up in the same folder; a replay of the step never creates a second one.
  • Parent. Left empty, the folder is created at the Drive root. The parent can be picked from the list (folders created by the app only), typed as an id, or pasted as a Drive folder URL.
  • Empty name. A name that resolves to empty (an expression with no value) fails with node_invalid_param.
  • Test runs. In test runs nothing is created: the step returns a folder whose id starts with simulated-, with created: true and simulated: true. An upload step that uses this id in the same test run only describes its upload too.
  • Errors. credential.capability_missing: Google Drive is not connected for the member running the workflow. google.not_found: the parent folder does not exist or the app cannot see it. google.bad_locator: the pasted parent is neither an id nor a recognised Drive URL. google.unavailable is retried automatically. See Error handling.