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
Overview
This node integrates with the Directus API to manage collections within a Directus project. Specifically, the Collections - Update operation allows users to update metadata of an existing collection by specifying its unique name and providing new metadata in JSON format.
Typical use cases include:
- Modifying descriptive information or notes about a collection.
- Updating custom metadata that affects how the collection is handled or displayed in Directus.
- Automating updates to collection configurations as part of a larger workflow.
For example, you might update the "articles" collection's metadata to add a note describing its purpose or to adjust settings stored in the metadata JSON.
Properties
| Name | Meaning |
|---|---|
| Collection | Unique name of the collection to update. |
| Update Fields | Additional fields to update on the collection. |
| Meta (JSON) | Metadata of the collection in JSON format. This can include any custom key-value pairs relevant to the collection. |
Output
The output is a JSON object representing the updated collection data returned from the Directus API after the update operation. It contains the collection's properties including the updated metadata.
Example output structure (simplified):
{
"collection": "articles",
"meta": {
"note": "Short quotes from happy customers."
},
// other collection properties...
}
No binary data output is involved in this operation.
Dependencies
- Requires an active connection to a Directus instance via an API key credential.
- The node uses the Directus REST API endpoint for collections.
- Proper permissions are needed to update collections in the Directus project.
Troubleshooting
- Invalid Collection Name: If the specified collection does not exist, the API will return an error. Verify the collection name is correct and exists in your Directus instance.
- Malformed JSON in Meta: The
metafield must be valid JSON. Invalid JSON syntax will cause parsing errors. Use proper JSON formatting. - Insufficient Permissions: Ensure the API key used has permission to update collections.
- API Connectivity Issues: Network problems or incorrect API credentials will prevent successful requests.
- Error Handling: If the node is set to continue on fail, errors will be returned in the output JSON under an
errorproperty.
Links and References
- Directus Collections API Documentation
- Directus Official Website
- n8n Documentation on HTTP Request Nodes
This summary is based solely on static analysis of the provided source code and input property definitions.