Actions111
- Item Actions
- Webhook Actions
- Collection Actions
- File Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Extension Actions
- Field Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
The node is designed to interact with a "Relation" resource, specifically to perform the "List" operation. This means it retrieves a list of relations for a specified collection from a Directus v1 API. Common scenarios for using this node include automating data integration tasks where you need to fetch and process relationships between collections in your Directus-managed database. For example, you might use this node to dynamically discover how different tables (collections) are linked, which can be useful for building dynamic workflows or generating reports.
Properties
| Name | Meaning |
|---|---|
| Collection Name | Unique name of the parent collection. Options are loaded dynamically (e.g., "articles"). |
| Split Into Items | Whether to output each element of an array as its own item (true/false). |
Output
- The node outputs a JSON field containing the list of relations for the specified collection.
- If "Split Into Items" is enabled, each relation will be output as a separate item.
- The structure of each output item typically includes details about the relationship, such as the related collection names and fields, but the exact structure depends on the Directus API response.
Dependencies
- Requires access to a Directus v1 API instance.
- May require authentication credentials or API keys configured within n8n to connect to the Directus service.
Troubleshooting
- Invalid Collection Name: If the specified collection does not exist, the node may throw an error indicating that the collection was not found. Ensure the collection name is correct and exists in your Directus instance.
- Authentication Errors: If API credentials are missing or incorrect, you may receive authentication or authorization errors. Double-check your n8n credentials configuration.
- Empty Results: If there are no relations for the specified collection, the output will be empty. Verify that the collection has defined relations in Directus.