Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

This node updates an existing user in a Directus system by their unique ID. It is useful for automating user management tasks, such as updating user roles, contact information, or other profile details within workflows. For example, you might use this node to change a user's title after a promotion or update their email address based on data from another system.

Properties

Name Meaning
ID Primary key of the user. This is the unique identifier (e.g., UUID) of the user you want to update.
Data (JSON) A partial user object. Provide only the fields you wish to update, formatted as JSON. Example:
{
"title": "CTO"
}

Output

The output will be a JSON object representing the updated user. The structure will include all user fields returned by the Directus API after the update, such as:

{
  "id": "72a1ce24-4748-47de-a05f-ce9af3033727",
  "first_name": "Jane",
  "last_name": "Doe",
  "email": "jane.doe@example.com",
  "title": "CTO",
  ...
}

Note: The actual fields depend on your Directus configuration and the fields included in the user object.

Dependencies

  • Requires access to a Directus instance.
  • Authentication (such as an API token or credentials) must be configured in n8n for the node to interact with Directus.

Troubleshooting

  • Invalid User ID: If the provided ID does not match any user, the node may return an error indicating that the user was not found.
  • Malformed JSON in Data (JSON): If the JSON is invalid, the node will throw a parsing error. Ensure your input is valid JSON.
  • Insufficient Permissions: If the API credentials do not have permission to update users, you may receive a permissions error from Directus.
  • Missing Required Fields: If required fields are omitted in the update data, Directus may reject the request.

Links and References

Discussion