Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

This n8n node allows you to create a new folder within a system (likely Directus, based on the naming). It is useful for automating the organization of files or resources into folders, supporting both simple and nested folder structures. Common scenarios include:

  • Automatically creating project-specific folders when onboarding new clients.
  • Organizing uploaded files by date or category.
  • Structuring content hierarchies in a headless CMS.

Example:
When a new user signs up, automatically create a personal folder for them in your storage system.

Properties

Name Type Meaning
Name String Name of the folder to be created. Required.
JSON/RAW Parameters Boolean If enabled, allows specifying body parameters as raw JSON instead of using UI fields.
Body Parameters JSON Raw JSON object for body parameters. Used only if "JSON/RAW Parameters" is enabled.
Additional Fields Collection Optional extra fields. For example, "Parent" lets you specify a parent folder for nesting.
└─ Parent String Unique identifier of the parent folder, enabling creation of nested folders.

Output

The node outputs a json field containing details about the newly created folder. The structure typically includes:

{
  "id": "string",         // Unique identifier of the created folder
  "name": "string",       // Name of the folder
  "parent": "string|null" // ID of the parent folder, if specified
  // ...other metadata returned by the API
}

Note: The exact output fields depend on the underlying API response.

Dependencies

  • External Service: Requires access to a Directus instance (or similar service).
  • Authentication: May require an API key or credentials configured in n8n.
  • n8n Configuration: Ensure the node is properly authenticated and has network access to the target service.

Troubleshooting

  • Missing Required Field:
    Error: "Name is required."
    Resolution: Ensure the "Name" property is provided.

  • Invalid Parent ID:
    Error: "Parent not found" or similar.
    Resolution: Verify that the specified parent folder ID exists.

  • Authentication Errors:
    Error: "Unauthorized" or "Invalid API Key."
    Resolution: Check your API credentials and connection settings in n8n.

  • Malformed JSON:
    Error: "Invalid JSON in Body Parameters."
    Resolution: When using raw JSON, ensure the syntax is correct.

Links and References

Discussion