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
Presets → List
AI-generatedOverview
The Directus (DrWade) n8n node for the resource Presets with the operation List allows you to retrieve a list of preset configurations from your Directus instance. This is useful for automating workflows that need to access, filter, or export preset definitions—such as user interface presets or saved views—within Directus.
Common scenarios:
- Fetching all available presets for reporting or auditing.
- Filtering presets based on specific criteria.
- Exporting presets data in various formats (CSV, JSON, XML) for backup or integration with other systems.
- Processing each preset individually within an n8n workflow.
Practical example:
You might use this node to automatically export all UI presets to a CSV file every week, or to trigger actions in n8n whenever new presets are added or modified.
Properties
| Name | Type | Meaning |
|---|---|---|
| Return All | boolean | If enabled, returns all results; if disabled, limits the number of returned items according to the "Limit" property. |
| Limit | number | The maximum number of presets to return. Only used if "Return All" is false. Must be between 1 and 100. |
| Split Into Items | boolean | If enabled, outputs each element of the result array as its own item in the n8n workflow. |
| JSON/RAW Parameters | boolean | If enabled, allows setting query parameters via a raw JSON object instead of using the UI fields. |
| Query Parameters | json | (Visible only if "JSON/RAW Parameters" is true) Custom query parameters as a flat JSON object. |
| Additional Fields | collection | (Visible only if "JSON/RAW Parameters" is false) Extra options for filtering, aggregation, exporting, etc. See below for sub-options. |
| └ Aggregate | collection | Aggregation functions to apply (e.g., count, sum, average) on specified fields. |
| └ Binary Property for Export Data | string | Name of the binary property to which exported data will be attached. |
| └ Deep (JSON) | json | Allows setting nested query parameters for related datasets. |
| └ Export | options | Format to export the API response: csv, json, or xml. If set, the output will include binary data. |
| └ Fields | string | Specifies which fields to return in the objects. |
| └ File Name for Export Data | string | File name (without extension) for exported data files. |
| └ Filter (JSON) | json | Conditions to filter the presets by. |
| └ Group By | string | Field(s) to group results by, enabling grouped aggregations. |
| └ Meta | string | Metadata to include in the response. |
| └ Offset | number | Number of items to skip (for pagination). |
| └ Search | string | Search term to filter presets containing the given query. |
| └ Sort | string | How to sort the returned items. Comma-separated field names, with optional minus sign for descending order. |
Output
- json:
- If "Split Into Items" is enabled, each output item contains a single preset object in the
jsonfield. - If not, the
jsonfield contains either:- An array of preset objects (if multiple are returned), or
- A single object (if only one is returned).
- If "Split Into Items" is enabled, each output item contains a single preset object in the
- binary (optional):
- If "Export" is set (csv, json, or xml), the output will also include a
binaryproperty containing the exported data file under the specified "Binary Property for Export Data" name.
- If "Export" is set (csv, json, or xml), the output will also include a
Example output structure:
{
"json": {
// Preset object or array of preset objects
},
"binary": {
// (Optional) Exported file data if "Export" is used
}
}
Dependencies
- Directus API: Requires a valid Directus instance and API credentials configured in n8n.
- n8n Credentials: You must set up the "directusApi" credential in n8n for authentication.
Troubleshooting
Common issues:
- Authentication errors: Ensure your Directus API credentials are correct and have sufficient permissions.
- Invalid JSON: When using "JSON/RAW Parameters", ensure your JSON is properly formatted.
- Limit exceeded: If "Limit" is set above 100, the node may throw an error due to the enforced max value.
- Empty results: If filters are too restrictive, no presets may be returned.
- Export errors: If "Export" is selected but required properties like "File Name for Export Data" are missing or invalid, the export may fail.
Error messages:
"error": "Unexpected token ...": Indicates malformed JSON input."error": "Request failed with status code 401": Authentication failure; check credentials."error": "limit must be between 1 and 100": Adjust the "Limit" property.