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
Fields → List All
AI-generatedOverview
The Directus (DrWade) n8n node for the resource Fields and operation List All allows you to retrieve a list of all fields defined in your Directus instance, across all collections. This is useful for automation scenarios where you need to dynamically inspect or process metadata about your data model, such as generating documentation, building dynamic forms, or performing audits on field configurations.
Practical examples:
- Automatically generate a report of all fields in your Directus project.
- Use in workflows that need to validate or synchronize schema information with other systems.
- Feed field definitions into code generation or UI-building tools.
Properties
| Name | Type | Meaning |
|---|---|---|
| Split Into Items | Boolean | Outputs each element of the returned array as its own item in the flow. |
Output
- The output is provided in the
jsonfield. - If Split Into Items is enabled, each field object from the Directus API response will be emitted as a separate item.
- If not enabled, the entire array of field objects will be output as a single item.
Structure of each field object:
The structure depends on the Directus API, but typically includes properties like:
{
"id": "...",
"collection": "...",
"field": "...",
"type": "...",
"meta": { ... },
...
}
- Each object represents a field definition, including its name, type, collection, and additional metadata.
Dependencies
- Directus API: Requires access to a running Directus instance.
- API Credentials: You must configure the
directusApicredential in n8n with appropriate permissions to read field definitions.
Troubleshooting
- Authentication errors: Ensure your API credentials are correct and have permission to access the fields endpoint.
- Empty results: If no fields are returned, verify that your Directus instance contains collections and fields, and that your user has sufficient permissions.
- Malformed output: If you receive unexpected output, check if the "Split Into Items" option matches your workflow's expectations.
Common error messages:
"error": "Request failed with status code 401": Invalid or missing credentials."error": "Network Error": n8n cannot reach your Directus instance; check network/firewall settings."error": "Cannot read property 'data' of undefined": The API response did not include expected data; check Directus version compatibility.