Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Overview

The node implements a "Folder Create" operation for a resource named "Folder." It allows users to create new folders within a system, optionally nested under a parent folder. This is useful in scenarios where organizing data or files hierarchically is needed, such as managing project directories, categorizing assets, or structuring content repositories.

For example, a user can create a top-level folder named "Nature" or create a subfolder inside an existing folder by specifying the parent's unique identifier.

Properties

Name Meaning
Name The name of the folder to be created.
JSON/RAW Parameters Whether to provide the body parameters as structured UI fields (false) or as raw JSON (true).
Body Parameters The folder creation parameters provided as raw JSON or RAW text when JSON/RAW Parameters is true.
Additional Fields Optional extra fields; currently supports:
- Parent: Unique identifier of the parent folder to nest this folder under.

Output

The node outputs JSON data representing the newly created folder object. This typically includes the folder's unique identifier, name, and any other metadata returned by the underlying API or service. There is no indication that binary data is output by this node.

Dependencies

  • The node relies on an external API or service to manage folders, accessed via methods imported from bundled dependencies.
  • It requires appropriate authentication credentials (e.g., an API key or token) configured in n8n to authorize folder creation requests.
  • No additional environment variables are explicitly required based on the provided code.

Troubleshooting

  • Missing Required Fields: If the "Name" property is empty, the node will likely fail because the folder name is mandatory.
  • Invalid Parent ID: Providing an incorrect or non-existent parent folder ID may cause errors or result in the folder being created at the root level.
  • JSON Syntax Errors: When using JSON/RAW Parameters mode, malformed JSON in the "Body Parameters" field will cause parsing errors.
  • Authentication Failures: Ensure that the API credentials are correctly set up and have permissions to create folders.
  • API Limitations: Some APIs may restrict folder nesting depth or naming conventions; violating these may cause errors.

Links and References

Discussion