Actions14
Overview
The Folder → Create operation in the Microsoft SharePoint n8n node allows you to create new folders (and subfolders) within a specified SharePoint site. This is useful for automating document management, organizing files, or preparing folder structures for team collaboration. For example, you might use this node to automatically generate project folders when a new project is started, or to organize uploaded documents into department-specific directories.
Properties
Name | Meaning |
---|---|
Site ID | The identifier or name of the SharePoint site where the folder will be created. Options are selectable. |
Name | The name or path of the folder to create. You can specify nested folders using slashes (e.g., /Folder/Subfolder ). This field is required. |
Options | Additional settings for folder creation. |
— Parent Folder ID | (Within Options) The ID of the parent folder under which the new folder should be created. If not set, the folder is created at the root level. |
Output
- The output is an array of JSON objects representing the created folder(s).
- Each object contains details about the newly created folder, such as its
id
,name
, and other metadata returned by the SharePoint API. - If multiple nested folders are created (via a path), only the final folder's information is returned.
- In case of error and if "Continue On Fail" is enabled, the output will include an
error
field with the error message.
Example output:
[
{
"id": "0123456789abcdef",
"name": "Subfolder",
"webUrl": "https://yourtenant.sharepoint.com/sites/yoursite/Shared%20Documents/Folder/Subfolder",
...
}
]
Dependencies
- External Service: Requires access to Microsoft SharePoint Online.
- Authentication: Needs valid OAuth2 credentials (
microsoftSharepointOAuth2Api
) configured in n8n. - n8n Configuration: No additional environment variables are needed beyond standard credential setup.
Troubleshooting
Common Issues:
- Invalid Site ID: If the provided Site ID is incorrect, the node will fail to create the folder.
- Permission Denied: The connected account must have permission to create folders in the target location.
- Parent Folder Not Found: If the specified Parent Folder ID does not exist, the operation will fail.
- Malformed Path: If the "Name" property includes invalid characters or formatting, folder creation may fail.
Error Messages:
"The ID you provided does not belong to a file."
: This is specific to file operations, but similar errors may occur if folder IDs are incorrect.- Errors are returned in the output under an
error
field if "Continue On Fail" is enabled; otherwise, the workflow stops.