Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

This n8n node is designed to interact with a "Collection" resource, specifically to perform the "Get" operation. It retrieves information about a specific collection by its unique name. This node is useful in scenarios where you need to fetch metadata or details about a particular collection from a Directus instance, such as when automating content management workflows or integrating data between systems.

Practical examples:

  • Fetching schema details of a collection named "articles" to dynamically generate forms.
  • Validating the existence and structure of a collection before performing further operations.
  • Integrating with other nodes to process or display collection metadata.

Properties

Name Type Meaning
Collection Name options Unique name of the collection to retrieve (e.g., "articles"). Required for this operation.

Output

The node outputs a json field containing the details of the requested collection. The exact structure depends on the Directus API response, but typically includes metadata such as the collection's name, fields, schema, and configuration.

Dependencies

  • External Service: Requires access to a Directus instance.
  • Authentication: May require an API key or credentials configured within n8n to connect to Directus.
  • n8n Configuration: Ensure that the Directus credentials are set up in n8n for successful connection.

Troubleshooting

  • Common Issues:

    • Invalid Collection Name: If the specified collection does not exist, the node may return an error or empty result.
    • Authentication Errors: Missing or incorrect API credentials can lead to authorization failures.
    • Network Issues: Connectivity problems with the Directus server will prevent data retrieval.
  • Error Messages & Resolutions:

    • "Collection not found": Verify the collection name is correct and exists in Directus.
    • "Unauthorized" or "Forbidden": Check your API credentials and permissions in n8n.
    • "Network Error": Ensure the Directus server is reachable from your n8n instance.

Links and References

Discussion