Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Overview

The node provides an operation to update a folder object in a system that manages folders (likely a content or data management system). It allows users to modify properties of an existing folder by specifying its unique ID and the fields to update. This is useful for organizing hierarchical data structures, such as categorizing items into nested folders.

Common scenarios include:

  • Renaming a folder.
  • Changing the parent folder to reorganize the folder hierarchy.
  • Updating multiple folder attributes via JSON input.

Example: A user wants to rename a folder with ID 0fca80c4-d61c-4404-9fd7-6ba86b64154d to "Cities" and move it under a different parent folder.

Properties

Name Meaning
ID Unique ID of the folder object to update (required).
JSON/RAW Parameters Boolean flag to choose between UI-based key-value input or raw JSON input for body params.
Body Parameters Raw JSON or RAW input specifying the fields to update when JSON/RAW Parameters is true.
Update Fields Collection of fields to update when JSON/RAW Parameters is false:
- Name New name of the folder (cannot be null or empty).
- Parent Unique identifier of the parent folder to nest this folder under.

Output

The output will contain the updated folder object in the json field. This typically includes the folder's properties after the update, such as its ID, name, parent ID, and any other metadata returned by the system.

If binary data were involved (not indicated here), it would represent file contents or attachments related to the folder, but this node focuses on JSON data updates only.

Dependencies

  • Requires connection to the backend service managing folders (e.g., a Directus API).
  • Needs appropriate authentication credentials (such as an API key or token) configured in n8n to authorize update operations.
  • The node depends on bundled methods and router logic from internal modules (./actions/router, ./methods) to perform the update.

Troubleshooting

  • Missing or invalid ID: The update operation requires a valid folder ID. Ensure the ID is correct and exists.
  • Empty or invalid update fields: When not using JSON input, ensure at least one field (Name or Parent) is provided and valid.
  • Invalid JSON syntax: If using JSON/RAW parameters, malformed JSON will cause errors. Validate JSON before submission.
  • Permission errors: Insufficient permissions or invalid credentials may result in authorization failures.
  • Parent folder does not exist: Setting a non-existent parent ID will likely cause an error; verify parent folder IDs.

Links and References

Discussion