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
Overview
This node integrates with the Directus API to perform various operations on different Directus resources. Specifically, for the Fields resource and the List All operation, it retrieves all fields defined in a specified collection or context within Directus.
This operation is useful when you want to programmatically fetch metadata about fields, such as their names, types, and configurations, which can be used for dynamic form generation, validation, or integration workflows that depend on schema information.
Practical example:
You might use this node to list all fields of a collection before creating or updating items, ensuring your workflow dynamically adapts to the current schema without hardcoding field names.
Properties
| Name | Meaning |
|---|---|
| Split Into Items | Boolean option to output each element of the returned array as its own separate item. If set to true, each field will be emitted individually; if false, all fields are output as a single array object. |
Output
- The output contains a JSON object or an array of JSON objects representing the fields retrieved from the Directus API.
- Each JSON object corresponds to a field's metadata, including properties like field name, type, and other configuration details as provided by Directus.
- If "Split Into Items" is enabled, each field is output as a separate item; otherwise, all fields are output together in one item.
- This node does not output binary data for this operation.
Dependencies
- Requires a valid connection to a Directus instance via an API key credential configured in n8n.
- The node uses the Directus REST API endpoints to fetch field data.
- No additional external dependencies beyond the Directus API and proper authentication.
Troubleshooting
Common issues:
- Authentication errors due to invalid or missing API credentials.
- Network connectivity problems preventing access to the Directus API.
- Incorrect resource or operation selection leading to unexpected results.
- Large datasets may cause timeouts or performance issues if "Return All" or similar options are used elsewhere (not directly relevant here but common in list operations).
Error messages:
- Errors returned from the Directus API will be propagated, often indicating HTTP status codes like 401 Unauthorized or 404 Not Found.
- Parsing errors if JSON parameters are malformed.
- To resolve, verify API credentials, ensure the Directus instance is reachable, and check parameter correctness.
Links and References
- Directus API Documentation – Official reference for Directus REST API endpoints, including fields.
- n8n Documentation – For general guidance on using nodes and credentials in n8n.
If you need further details on other operations or resources, feel free to ask!