Skip to main content

Create Folder

Creates a new folder in Google Drive.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Drive Id - The identifier for the connected Google Drive service obtained from the Connect node.
  • Folder Name - The name for the new folder to be created.

Options

  • Parent Folder Id - (Optional) The ID of the parent folder where the new folder should be created. If not specified, the folder will be created in the root of the drive.

Output

  • folder_id - The unique identifier of the newly created folder.

How It Works

The Create Folder node creates a new folder in Google Drive. When executed, the node:

  1. Validates the required inputs (Drive Id and Folder Name)
  2. Retrieves the Google Drive service client using the provided Drive Id
  3. Creates a new File object with the specified name and folder MIME type
  4. If a Parent Folder Id is specified, sets it as the parent of the new folder
  5. Uses the Google Drive API to create the folder with the Files.Create method
  6. Returns the ID of the newly created folder

Requirements

  • A valid Google Drive connection established using the Connect node
  • A valid folder name
  • Appropriate permissions to create folders in the specified location

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Drive Id
  • Empty or invalid Folder Name
  • Google Drive API errors during the folder creation
  • Insufficient permissions to create folders in the specified location
  • Invalid Parent Folder Id (if specified)

Usage Notes

  • The folder will be created with the specified name in either the root of the drive or within the specified parent folder
  • If a Parent Folder Id is specified, the new folder will be created as a subfolder of that folder
  • The returned folder_id can be used in subsequent operations to create files or subfolders within this folder
  • Folder names do not need to be unique - Google Drive allows multiple folders with the same name