Actions109
- Activity Actions
- Assets Actions
- Authentication Actions
- Collections Actions
- Extensions Actions
- Fields Actions
- Files Actions
- Folders Actions
- Items Actions
- Permissions Actions
- Presets Actions
- Relations Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
- Webhooks Actions
Overview
This node integrates with the Directus API to manage folders within a Directus project. Specifically, the "Folders" resource with the "Create" operation allows users to create new folders in their Directus instance. This is useful for organizing files and assets into hierarchical structures.
Common scenarios include:
- Automatically creating categorized folders when uploading or managing assets.
- Structuring content storage dynamically based on workflow needs.
- Nesting folders by specifying parent folder IDs to maintain organized hierarchies.
Example: Creating a folder named "Nature" under a specific parent folder to organize related images.
Properties
| Name | Meaning |
|---|---|
| Name | The name of the folder to be created (e.g., "Nature"). |
| JSON/RAW Parameters | Whether to provide the body parameters as key-value pairs via UI (false) or as raw JSON (true). |
| Body Parameters | When using JSON/RAW mode, the full JSON object representing the folder properties. |
| Additional Fields | Optional extra fields; currently supports: |
| - Parent | Unique identifier of the parent folder to nest this folder inside another folder. |
Output
The output is a JSON object representing the newly created folder as returned by the Directus API. It typically includes details such as the folder's unique ID, name, parent folder ID (if any), and metadata.
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to a Directus instance via an API key credential configured in n8n.
- The node uses the Directus REST API endpoints for folder management.
- No additional external dependencies beyond the Directus API and proper authentication.
Troubleshooting
- Authentication Errors: Ensure that the API key credential is valid and has permissions to create folders.
- Invalid Folder Name: The "Name" property is required; missing or empty names will cause errors.
- Parent Folder Issues: If specifying a parent folder ID, verify that it exists and is accessible.
- JSON Parsing Errors: When using JSON/RAW parameters, ensure the JSON syntax is correct to avoid parsing failures.
- API Rate Limits or Network Issues: Temporary connectivity problems may cause request failures; retry or check network status.
Common error messages usually come from the Directus API and relate to invalid input, permission denied, or resource not found.