Actions111
- Item Actions
- Webhook Actions
- Collection Actions
- File Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Extension Actions
- Field Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
This n8n node is designed to update an existing collection in a Directus instance. It allows users to specify the collection they want to update and provide new metadata for that collection. This node is useful in scenarios where you need to programmatically modify collection properties, such as updating descriptions, notes, or other metadata fields.
Practical examples:
- Updating the description or note of a content collection after a review.
- Automating the process of adding or modifying metadata for collections based on external triggers or workflows.
Properties
| Name | Type | Meaning |
|---|---|---|
| Collection Name | options | Unique name of the collection to update. Users select from available collections. |
| Update Fields | collection | A set of fields to update. Currently supports "Meta (JSON)" for updating collection metadata. |
| Meta (JSON) | json | Metadata of the collection, provided as a JSON object (e.g., notes or custom attributes). |
Output
The output will be a JSON object reflecting the updated state of the collection. The structure typically includes:
- The collection's unique identifier (name).
- Updated metadata fields as specified in the input.
- Any other relevant collection properties returned by the Directus API after the update.
Example output:
{
"collection": "articles",
"meta": {
"note": "Short quotes from happy customers."
},
// ...other collection properties
}
Dependencies
- Directus API: Requires access to a Directus instance with appropriate permissions to update collections.
- Authentication: May require an API key or user credentials configured in n8n credentials for Directus.
Troubleshooting
- Invalid Collection Name: If the specified collection does not exist, the node may throw an error indicating the collection was not found.
- Malformed JSON in Meta: Providing invalid JSON in the "Meta (JSON)" field can result in parsing errors. Ensure the JSON is properly formatted.
- Insufficient Permissions: If the connected Directus user lacks permission to update collections, the operation will fail with an authorization error.