Actions109
- Activity Actions
- Assets Actions
- Authentication Actions
- Collections Actions
- Extensions Actions
- Fields Actions
- Files Actions
- Folders Actions
- Items Actions
- Permissions Actions
- Presets Actions
- Relations Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
- Webhooks Actions
Collections → Update
AI-generatedOverview
The Directus (DrWade) n8n node for the resource Collections and operation Update allows you to update the metadata of an existing collection in your Directus instance. This is useful when you need to programmatically change properties such as the collection's description, notes, or other metadata fields.
Common scenarios:
- Updating documentation or notes for a collection.
- Modifying custom metadata used by your application or team.
- Automating changes to collection settings as part of a workflow.
Practical example:
Suppose you have a collection called articles and want to update its metadata to include a new note or change its display name. You can use this node in your n8n workflow to automate that update whenever needed.
Properties
| Name | Type | Meaning |
|---|---|---|
| Collection | options | Unique name of the collection to update. Required. |
| Update Fields | collection | A set of additional fields to update. For this operation, only "Meta (JSON)" is available. |
| Meta (JSON) | json | Metadata of the collection. Should be a JSON object with keys/values for collection meta. Optional. |
Output
- The output will be a single item with a
jsonfield containing the updated collection data as returned by the Directus API. - The structure of the
jsonfield matches the Directus Collection object, typically including:collection: The name of the collection.meta: The updated metadata object.- Other standard collection properties (e.g.,
schema,fields, etc.), depending on what the API returns.
Example output:
{
"collection": "articles",
"meta": {
"note": "Short quotes from happy customers."
},
// ...other collection properties
}
Dependencies
- Directus API: Requires access to a running Directus instance.
- API Credentials: You must configure the
directusApicredentials in n8n for authentication.
Troubleshooting
Common issues:
- Invalid Collection Name: If the specified collection does not exist, the node will throw an error.
- Malformed JSON in Meta: If the "Meta (JSON)" field contains invalid JSON, the request will fail.
- Insufficient Permissions: The API user must have permission to update collections; otherwise, you'll receive an authorization error.
Error messages and resolutions:
"Cannot find collection": Check that the collection name is correct and exists in Directus."Unexpected token"or similar JSON parse errors: Ensure the "Meta (JSON)" input is valid JSON."Unauthorized"or"Forbidden": Verify your API credentials and permissions.