Actions109
- Collections Actions
- Activity Actions
- Assets Actions
- Authentication 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
Overview
The Directus (DrWade) n8n node for the resource Settings with the operation Get allows you to retrieve global settings from a Directus instance. This is useful for automating workflows that need to access or export configuration data, such as environment variables, branding, project information, and other system-wide settings.
Common scenarios:
- Exporting all Directus settings for backup or migration.
- Auditing or monitoring changes in system configuration.
- Integrating settings data into reporting or documentation workflows.
Practical example:
You might use this node to fetch all settings and save them as a CSV file for compliance records, or to synchronize settings between multiple Directus environments.
Properties
| Name | Type | Meaning |
|---|---|---|
| JSON/RAW Parameters | boolean | If enabled, query parameters are provided as a raw JSON object instead of using the UI fields. Useful for advanced users who want to specify complex queries directly. |
| Query Parameters | json | (Shown if JSON/RAW Parameters is true) The query parameters as a flat JSON object. Allows direct control over the API request's query string. |
| Additional Fields | collection | (Shown if JSON/RAW Parameters is false) A set of additional options to customize the request, including aggregation, export format, filtering, sorting, etc. |
| Aggregate | fixedCollection | Aggregation functions to perform calculations on settings data, such as count, sum, average, min, max, etc. |
| Binary Property for Export Data | string | The name of the binary property where exported data (file) will be stored if exporting. Default is "data". |
| Deep (JSON) | json | Allows setting nested query parameters for relational datasets. Used for advanced querying. |
| Export | options | Choose to export the API response as a file in JSON, CSV, or XML format. |
| Fields | string | Specify which fields should be returned in the response. |
| File Name for Export Data | string | The base file name (without extension) for exported data files. |
| Filter (JSON) | json | Apply conditions to select specific items in the settings collection. |
| Group By | string | Group results by specified fields, enabling grouped aggregations. |
| Meta | string | Specify what metadata to include in the response. |
| Offset | number | Number of items to skip when fetching data (for pagination). |
| Search | string | Filter settings by a search query applied to one or more fields. |
| Sort | string | Define sorting order for the returned items. Accepts comma-separated field names, with optional minus sign for descending order. |
Output
- The node outputs a single item (or multiple items if the response is an array), each with a
jsonproperty containing the settings data retrieved from Directus. - If the Export option is used, the output will also include a
binaryproperty containing the exported file (in the selected format: JSON, CSV, or XML).
Example output (JSON):
{
"json": {
"project_name": "My Project",
"branding": { "logo": "..." },
...
}
}
If exporting:
{
"json": { ... },
"binary": {
"data": {
"data": "<Buffer ...>",
"fileName": "export.json",
"mimeType": "application/json"
}
}
}
Dependencies
- Directus API: Requires a valid Directus instance accessible via HTTP(S).
- API Credentials: You must configure the
directusApicredentials in n8n for authentication.
Troubleshooting
Common issues:
- Invalid credentials: Ensure your Directus API credentials are correct and have permission to access settings.
- Malformed JSON: When using JSON/RAW Parameters, ensure your JSON syntax is valid; otherwise, parsing errors will occur.
- Empty or unexpected output: Check that the Directus instance contains settings and that any filters or fields specified are correct.
- Export errors: If exporting, ensure the file name and binary property name are valid and not conflicting with other nodes.
Error messages:
"Unexpected token ... in JSON": Indicates invalid JSON input in parameters."Request failed with status code 401": Authentication error; check credentials."Cannot read property 'data' of undefined": Likely due to an unexpected API response; verify endpoint and parameters.