Actions111
- Item Actions
- Webhook Actions
- Collection Actions
- File Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Extension Actions
- Field Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
The "Role: Update Multiple" operation in this custom n8n node allows users to update several roles at once within a Directus system. This is particularly useful for administrators who need to modify properties (such as icons, permissions, or descriptions) of multiple roles simultaneously, streamlining bulk updates and reducing repetitive manual work.
Practical Example:
Suppose you want to change the icon for several user roles after a branding update. Instead of updating each role individually, you can use this node to specify all relevant role IDs and apply the new icon in one go.
Properties
| Name | Meaning |
|---|---|
| Data (JSON) | Required. A JSON object containing: - keys: An array of primary keys (IDs) of the roles to update.- data: An object with the fields and values to update for those roles. See role object documentation for available properties. |
Output
- The output will be a JSON object reflecting the result of the bulk update operation. Typically, this includes information about the updated roles, such as their IDs and the new property values.
- No binary data is produced by this operation.
Dependencies
- Directus API: Requires access to a Directus instance with appropriate permissions to update roles.
- Authentication: The node may require an API key or credentials configured in n8n to authenticate with Directus.
Troubleshooting
Common Issues:
- Invalid Role IDs: If any provided ID in
keysdoes not exist, the update may fail for that entry. - Malformed JSON: Ensure the
Data (JSON)property is valid JSON and follows the required structure. - Insufficient Permissions: The connected Directus account must have permission to update roles.
- Invalid Role IDs: If any provided ID in
Error Messages:
"Invalid input": Check that your JSON is correctly formatted and contains bothkeysanddata."Permission denied": Verify that your API credentials have the necessary rights to update roles.