Skip to main content

Create Folder

Creates a new folder in the specified email client or service.

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 ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • Client Id - The Id of the email client or service that the new folder will be created in. The ID is created by the Connect node.
  • Folder Name - The name of the new folder to be created.

Options

  • Credentials - The credentials used to authenticate the email client or service. Required if there is no Client Id.

The credentials are passed in through a secure vault.

How It Works

The Create Folder node creates a new mailbox folder using IMAP CREATE command. Here's the process:

  1. Authentication - Uses Client ID or direct credentials
  2. Folder Name Validation - Validates folder name is not empty
  3. IMAP CREATE Command - Executes CREATE command on mail server
  4. Folder Creation - Mail server creates the new folder
  5. Confirmation - Returns success when folder is created

Requirements

  • Client ID from Connect node OR Credentials from vault with IMAP access
  • Folder Name - Valid folder name (cannot be empty)

Error Handling

Error CodeDescriptionResolution
Core.Mail.CreateFolder.ErrOnCreateConfig parse errorCheck node configuration
Core.Mail.CreateFolder.ErrCredentialsInvalid credentialsVerify vault credentials
Core.Mail.CreateFolder.ErrFolderFolder name is emptyProvide folder name
Core.Mail.CreateFolder.ErrClientIdClient ID not foundEnsure Connect node executed
Core.Mail.CreateFolder.CreateFolder creation failedFolder may already exist or name is invalid
Core.Mail.ErrConnConnection missingEnsure Connect executed

Usage Examples

Example 1: Create Simple Folder

{
"client_id": "{{client_id}}",
"folder_name": "Archive"
}
// Creates "Archive" folder in root

Example 2: Create Subfolder

{
"client_id": "{{client_id}}",
"folder_name": "Work/Projects"
}
// Creates "Projects" as subfolder of "Work"
// Note: Parent folder "Work" must exist first

Example 3: Organize by Year

var year = new Date().getFullYear();
// Use Create Folder node with:
// folder_name: `Archive/${year}`
// Creates year-based archive folder

Usage Notes

  • Folder Names: Use forward slash (/) for subfolders (e.g., "Archive/2024")
  • Parent Folders: Parent folders must exist before creating subfolders
  • Duplicate Names: Creating existing folder may fail or succeed silently (server-dependent)
  • Special Characters: Avoid special characters in folder names
  • Case Sensitivity: Folder names are case-sensitive

Tips

  • Check Existence First: Use List Folders to verify folder doesn't exist
  • Create Parents First: Create parent folders before subfolders
  • Naming Convention: Use consistent naming for automation
  • Error Handling: Use Try-Catch to handle duplicate folder creation attempts