Actions100
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Item Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
The node provides an interface to update a specific collection in a Directus system. It allows users to modify the metadata of an existing collection by specifying its unique name and updating fields such as metadata in JSON format. This is useful for managing collections dynamically, for example, adding notes or additional descriptive information to collections without manually editing the backend.
Practical examples:
- Updating the metadata of a "products" collection to include a note about seasonal discounts.
- Modifying the metadata of a "customers" collection to add internal comments or tags.
Properties
Name | Meaning |
---|---|
Collection Name | Unique name of the collection to update. Options are dynamically loaded from available collections. |
Update Fields | Additional fields to update in the collection. Currently supports: |
- Meta (JSON) | Metadata of the collection in JSON format, e.g., {"note": "Short quotes from happy customers."} |
Output
The node outputs JSON data representing the updated collection object after the update operation completes. This typically includes the collection's properties reflecting the changes made, such as updated metadata.
No binary data output is indicated.
Dependencies
- Requires connection to a Directus API instance.
- Needs appropriate API authentication credentials configured in n8n to authorize update operations on collections.
- The node depends on internal methods to load available collections dynamically for selection.
Troubleshooting
Common issues:
- Providing an invalid or non-existent collection name will likely result in an error.
- Malformed JSON in the "Meta (JSON)" field can cause parsing errors.
- Insufficient permissions or incorrect API credentials may lead to authorization failures.
Error messages and resolutions:
- "Collection not found": Verify the collection name exists and is correctly spelled.
- "Invalid JSON format": Ensure the JSON entered in the metadata field is valid.
- "Unauthorized" or "Forbidden": Check API credentials and permissions for updating collections.