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 → List
AI-generatedOverview
The Directus (DrWade) n8n node for the Users resource with the List operation allows you to retrieve a list of users from your Directus instance. This is useful for automating workflows that need to access, process, or export user data, such as generating reports, synchronizing user lists with other systems, or performing bulk operations on user accounts.
Practical examples:
- Fetch all users and send them a notification.
- Export user data to CSV for analysis.
- Filter users based on specific criteria (e.g., role, status).
- Retrieve only selected fields for lightweight integrations.
Properties
| Name | Type | Meaning |
|---|---|---|
| Return All | boolean | If enabled, returns all user records; if disabled, limits the number of returned users according to the "Limit" property. |
| Limit | number | The maximum number of user records to return (only used if "Return All" is false). Must be between 1 and 100. |
| Split Into Items | boolean | If enabled, outputs each user as a separate item in the workflow; otherwise, returns all users in a single array. |
| JSON/RAW Parameters | boolean | If enabled, allows setting query/body parameters via raw JSON instead of the UI fields. |
| Body Parameters | json | Raw JSON body parameters for advanced queries (used when "JSON/RAW Parameters" is enabled). |
| Additional Fields | collection | Extra options to refine the query, including aggregation, export settings, filtering, sorting, grouping, and more. |
| └ Aggregate | fixedCollection | Aggregation functions (e.g., count, sum, avg) to perform calculations on user fields. |
| └ Binary Property for Export Data | string | Name of the binary property to store exported file data. |
| └ Deep (JSON) | json | Set nested relational query parameters. |
| └ Export | options | Format to export the API response (json, csv, xml). |
| └ Fields | string | Specify which user fields to return. |
| └ File Name for Export Data | string | Filename for exported data (without extension). |
| └ Filter (JSON) | json | Conditions to filter users by. |
| └ Group By | string | Field(s) to group results by for aggregation. |
| └ Meta | string | Metadata to include in the response. |
| └ Offset | number | Number of users to skip (for pagination). |
| └ Search | string | Search term to filter users by matching fields. |
| └ Sort | string | Sorting order for the returned users (CSV of fields, use minus sign for descending). |
Output
If "Split Into Items" is enabled:
Each output item contains a single user's data in thejsonfield.If "Split Into Items" is disabled:
A single output item contains an array of users in thejsonfield.If "Export" is set (csv/json/xml):
- The exported file is available in the specified binary property (default:
data). - The
jsonfield still contains the user data (array or object).
- The exported file is available in the specified binary property (default:
Example output (Split Into Items = false):
{
"json": [
{
"id": 1,
"email": "user@example.com",
"first_name": "John",
...
},
{
"id": 2,
"email": "jane@example.com",
"first_name": "Jane",
...
}
]
}
Example output (Split Into Items = true):
{
"json": {
"id": 1,
"email": "user@example.com",
"first_name": "John",
...
}
}
Binary output:
If exporting, the binary property (e.g., data) will contain the file in the chosen format.
Dependencies
- Directus API: Requires a valid Directus instance accessible via HTTP(S).
- API Credentials: You must configure the
directusApicredentials in n8n with appropriate permissions to read user data.
Troubleshooting
Common issues:
- Authentication errors: Ensure your API credentials are correct and have permission to access user data.
- Invalid filter/sort/group syntax: When using JSON fields like "Filter" or "Deep", ensure the input is valid JSON.
- Export issues: If the export file is empty or missing, check that the "Export" option and "Binary Property for Export Data" are set correctly.
- Limit exceeded: If "Limit" is set above 100, the request may fail due to API restrictions.
Error messages:
"error": "Request failed with status code 401": Invalid credentials or insufficient permissions."error": "Unexpected token ... in JSON": Malformed JSON in one of the JSON input fields."error": "Field not found": Specified field in "Fields", "Sort", or "Group By" does not exist.