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
Users → Create
AI-generatedOverview
The Directus (DrWade) n8n node for the Users resource with the Create operation allows you to create a new user in your Directus instance. This is useful for automating user onboarding, integrating external signup forms, or batch-creating users from other systems into Directus.
Practical scenarios:
- Automatically add new employees to Directus when they join your company.
- Sync users from an external CRM or HR system into Directus.
- Create users as part of a workflow triggered by another event (e.g., form submission).
Properties
| Name | Type | Meaning |
|---|---|---|
| string | The email address of the new user. Required. | |
| Password | string | The password for the new user. Required. |
| JSON/RAW Parameters | boolean | If enabled, allows you to provide the request body as raw JSON instead of using individual fields. When true, use "Body Parameters". When false, use the standard fields and "Additional Fields". |
| Body Parameters | json | (Shown if JSON/RAW Parameters is true) The full user object as JSON or RAW. Allows advanced or bulk property setting. |
| Additional Fields | collection | (Shown if JSON/RAW Parameters is false) Optional extra properties for the user, such as avatar, description, first/last name, language, location, role, tags, TFA secret, theme, and title. See below for details. |
Additional Fields options:
- Avatar: string — Avatar file ID (many-to-one to files).
- Description: string — Description of the user.
- First Name: string — User's first name.
- Language: string — Language code for the admin app UI.
- Last Name: string — User's last name.
- Location: string — User's location.
- Role: options — Role ID for the user.
- Tags: string — Tags for the user.
- TFA Secret: string — Two-factor authentication secret.
- Theme: options — UI theme ("auto", "light", "dark").
- Title: string — User's title.
Output
- The node outputs a single item per created user.
- The output is a
jsonobject containing the newly created user's data as returned by the Directus API. - The structure typically includes fields like
id,email, and any additional fields set during creation. - Example output:
{ "id": "123", "email": "another@example.com", "first_name": "Admin", "role": "abc123", ... } - No binary data is produced by this operation.
Dependencies
- Directus API: You must have access to a running Directus instance.
- API Credentials: The node requires valid Directus API credentials configured in n8n under the name
directusApi. - n8n Configuration: Ensure the credentials are set up in the n8n credential store.
Troubleshooting
Common issues:
- Missing required fields: If "Email" or "Password" is not provided, the node will throw an error.
- Invalid JSON: If using "JSON/RAW Parameters" and the JSON is malformed, an error will occur.
- Permission errors: The API credentials used must have permission to create users in Directus.
- Duplicate email: Attempting to create a user with an email that already exists may result in an error from Directus.
Error messages and resolutions:
"error": "Request failed with status code 400": Check that all required fields are filled and valid."error": "Invalid JSON": Ensure your JSON input is correctly formatted."error": "Forbidden"or"error": "Unauthorized": Verify your API credentials and permissions.