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:
- Authentication - Uses Client ID or direct credentials
- Folder Name Validation - Validates folder name is not empty
- IMAP CREATE Command - Executes CREATE command on mail server
- Folder Creation - Mail server creates the new folder
- 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 Code | Description | Resolution |
|---|---|---|
| Core.Mail.CreateFolder.ErrOnCreate | Config parse error | Check node configuration |
| Core.Mail.CreateFolder.ErrCredentials | Invalid credentials | Verify vault credentials |
| Core.Mail.CreateFolder.ErrFolder | Folder name is empty | Provide folder name |
| Core.Mail.CreateFolder.ErrClientId | Client ID not found | Ensure Connect node executed |
| Core.Mail.CreateFolder.Create | Folder creation failed | Folder may already exist or name is invalid |
| Core.Mail.ErrConn | Connection missing | Ensure 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
Related Nodes
- List Folders - Check if folder exists
- Delete Folder - Remove folders
- Move Mail - Move emails to new folder