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 Directus n8n node, when configured with the Preset resource and the Get operation, retrieves a specific preset from a Directus instance using its primary key (ID). This is useful for workflows that need to fetch configuration presets, user interface settings, or saved filters from Directus for further processing or decision-making.
Common scenarios:
- Fetching a preset's details to use in subsequent workflow steps.
- Validating the existence or properties of a preset before updating or deleting it.
- Integrating Directus presets into reporting or automation tasks.
Example:
You might use this node to retrieve a saved filter preset for a dashboard, then use its configuration to query data or trigger notifications.
Properties
Name | Type | Meaning |
---|---|---|
ID | String | Primary key of the preset to retrieve. This uniquely identifies which preset will be fetched from Directus. |
Output
- The output is a single item with a
json
field containing the details of the requested preset. - The structure of the
json
object matches the Directus API response for a preset, typically including fields such as:id
: The unique identifier of the preset.bookmark
: The name or label of the preset.user
: The user associated with the preset.role
: The role associated with the preset.collection
: The collection this preset applies to.search
,filters
,layout
,layout_query
, etc.: Various configuration and UI-related settings.- Any other fields defined by your Directus instance for presets.
Example output:
{
"id": 39,
"bookmark": "My Filter",
"user": "1234-abcd",
"role": null,
"collection": "articles",
"search": "",
"filters": {},
"layout": "tabular",
"layout_query": {},
...
}
Dependencies
- Directus API: Requires access to a running Directus instance.
- API Credentials: You must configure the node with valid Directus API credentials (
directusApi
). - n8n Configuration: No special environment variables are required beyond standard credential setup.
Troubleshooting
Common issues:
- Invalid ID: If the provided ID does not exist, the node will return an error message indicating the preset was not found.
- Authentication errors: If credentials are missing or invalid, you may receive authentication/authorization errors from Directus.
- Connection issues: Network problems or incorrect API URLs can cause connection failures.
Error messages and resolutions:
"error": "Not Found"
: Check that the ID is correct and the preset exists."error": "Unauthorized"
: Verify your Directus API credentials in n8n."error": "Network Error"
: Ensure the Directus instance is reachable from your n8n server.
If the node is set to "Continue On Fail," errors will appear in the output under the error
property.