Actions100
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- Field Actions
- File Actions
- Folder Actions
- Item Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
Overview
The Users → Delete operation in this n8n node allows you to delete a user from a Directus instance by specifying the user's unique ID. This is useful for automating user management tasks, such as removing users who no longer require access or cleaning up test accounts.
Practical scenarios:
- Automatically remove users who have left an organization.
- Clean up demo or temporary user accounts after testing.
- Integrate with HR or IT systems to synchronize user removals.
Properties
| Name | Type | Meaning |
|---|---|---|
| ID | String | Primary key of the user to be deleted. |
Output
- The output will be a single object in the
jsonfield. - If the deletion is successful, the response will typically be an empty object (
{}) or may contain metadata depending on the Directus API version and configuration. - If there is an error (and "Continue On Fail" is enabled), the output will include an
errorproperty with the error message.
Example output:
{
"json": {}
}
or, on error:
{
"json": {
"error": "User not found"
}
}
Dependencies
- Directus API: Requires access to a running Directus instance.
- API Credentials: You must configure the
directusApicredentials in n8n with appropriate permissions to delete users.
Troubleshooting
Common issues:
- Invalid or missing ID: If the provided user ID does not exist, the node will return an error such as
"User not found". - Insufficient permissions: If the API credentials do not have permission to delete users, you may receive a "Forbidden" or "Unauthorized" error.
- Network/API errors: Connectivity issues or incorrect API endpoint configuration can result in request failures.
How to resolve:
- Double-check the user ID is correct and exists in Directus.
- Ensure the API credentials used have sufficient rights to perform deletions.
- Verify the Directus API URL and network connectivity from your n8n instance.