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 perform operations on various resources. Specifically, for the Items resource with the Update operation, it updates an existing item in a specified collection by its unique ID. This is useful when you want to modify data records stored in Directus collections programmatically within an n8n workflow.
Typical use cases include:
- Updating content or metadata of an article or product in a CMS.
- Modifying user profile information stored in a Directus collection.
- Adjusting inventory or order details in an e-commerce backend managed by Directus.
For example, you might update the title and body of an article identified by its ID in the "articles" collection.
Properties
| Name | Meaning |
|---|---|
| ID | Unique identifier of the item to update. |
| Collection | The name of the parent collection where the item resides. Only custom (non-system) collections are listed. |
| Data (JSON) | Partial JSON object representing the fields and values to update on the item. |
Output
The output is a JSON object representing the updated item as returned by the Directus API. It contains the updated fields and their new values after the patch operation.
If the update is successful, the output will typically include the full item object reflecting the changes made.
Dependencies
- Requires an active connection to a Directus instance via an API key credential configured in n8n.
- The node uses the Directus REST API endpoints to perform the update (
PATCHrequest toitems/{collection}/{id}). - No additional external dependencies beyond the Directus API and proper authentication.
Troubleshooting
- Invalid ID or Collection: If the provided item ID or collection name does not exist, the API will return an error. Verify that the ID corresponds to an existing item and the collection name is correct.
- Malformed JSON Data: The "Data (JSON)" property must be valid JSON. Invalid JSON syntax will cause parsing errors before the API call.
- Permission Issues: Ensure the API key used has sufficient permissions to update items in the specified collection.
- API Errors: Network issues or server errors from Directus will propagate as errors. Check connectivity and Directus server status.
- Continue On Fail: If enabled, the node will continue processing other items even if one update fails, returning error messages in the output JSON.
Links and References
This summary focuses exclusively on the "Items" resource with the "Update" operation as requested.