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
Items → Update Multiple
AI-generatedOverview
The Directus (DrWade) node for n8n, when configured with the resource Items and operation Update Multiple, allows you to update multiple items in a specified Directus collection in a single API call. This is particularly useful for batch updates, such as changing the status of several articles at once or applying bulk edits to records.
Common scenarios:
- Publishing or unpublishing multiple content items (e.g., articles, products).
- Bulk updating fields like tags, categories, or statuses across many records.
- Efficiently managing large datasets without making individual update requests for each item.
Practical example:
You have a collection called articles and want to set the status of articles with IDs 1 and 2 to "published". You can use this operation to update both items in one go.
Properties
| Name | Type | Meaning |
|---|---|---|
| Data (JSON) | json | An object containing an array of item keys (keys) to update and a data object with the new field values. See Directus item object. Example:{ |
| Collection | options | The unique name of the parent collection where the items reside (e.g., articles). |
Output
- The output will be a JSON object representing the result of the batch update operation from Directus.
- The structure typically matches the Directus Items API response, which may include:
- An array of updated item objects, each reflecting the new state after the update.
- If the API returns a different structure (such as a summary or count), it will be passed through as-is.
Example output:
{
"data": [
{
"id": 1,
"status": "published",
"...": "..."
},
{
"id": 2,
"status": "published",
"...": "..."
}
]
}
Note: The actual fields depend on your collection schema.
Dependencies
- Directus API: Requires access to a running Directus instance.
- API Credentials: You must configure the
directusApicredentials in n8n with appropriate permissions to update items in the target collection.
Troubleshooting
Common issues:
- Invalid Collection Name: If the collection does not exist, you'll receive an error from Directus.
- Malformed Data (JSON): If the
dataproperty is not valid JSON or missing required fields, the node will throw a parsing or validation error. - Permission Denied: If the API credentials lack permission to update items, the request will fail.
- Item Not Found: If any of the provided keys do not correspond to existing items, those updates may be skipped or cause errors depending on Directus configuration.
Error messages and resolutions:
"Cannot read property 'keys' of undefined": Ensure yourData (JSON)input includes akeysarray and adataobject."Collection not found": Double-check theCollectionvalue."Unauthorized"or"Forbidden": Verify your API credentials and their permissions.