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 user data in bulk. Specifically, the "Users" resource with the "Update Multiple" operation allows you to update multiple user records at once by specifying their unique keys and the data fields to modify.
Common scenarios for this node include:
- Bulk updating user roles or titles after a company reorganization.
- Changing multiple users' statuses or permissions simultaneously.
- Applying consistent profile updates across a group of users.
For example, you can update the title of several users by providing an array of their IDs and the new title value, streamlining administrative tasks that would otherwise require individual updates.
Properties
| Name | Meaning |
|---|---|
| Data (JSON) | A JSON object containing: - keys: An array of user primary keys (IDs) to update.- data: An object with any properties of the user object to update (e.g., "title": "CTO"). |
Example of the Data (JSON) property:
{
"keys": [
"72a1ce24-4748-47de-a05f-ce9af3033727",
"9c3d75a8-7a5f-41a4-be0a-1488fd974511"
],
"data": {
"title": "CTO"
}
}
Output
The node outputs an array of JSON objects representing the response from the Directus API after attempting to update the specified users. Each output item corresponds to the result of the update request.
The structure of each output JSON typically includes the updated user data or confirmation of the update operation. If the API returns errors, those will be included in the output JSON under an error message.
No binary data is produced by this operation.
Dependencies
- Requires a valid connection to a Directus instance via an API key credential configured in n8n.
- The node uses the Directus REST API endpoints and expects proper authentication.
- No additional external dependencies are required beyond the Directus API access.
Troubleshooting
- Invalid Keys: If the
keysarray contains invalid or non-existent user IDs, the API may return errors or fail to update those users. Ensure all keys are correct. - Malformed JSON: The
Data (JSON)input must be valid JSON. Syntax errors will cause parsing failures. - Insufficient Permissions: The API key used must have permission to update users. Lack of permissions will result in authorization errors.
- API Errors: Network issues or server errors from the Directus API will propagate as errors in the node execution.
- Continue on Fail: If enabled, the node will continue processing other items even if some updates fail, returning error details in the output JSON.
Links and References
This summary focuses on the "Users" resource and the "Update Multiple" operation as requested, based on static analysis of the provided source code and property definitions.