Directus icon

Directus

Consume Directus API

Overview

This node integrates with the Directus API, allowing users to perform various operations on Directus resources. Specifically, for the Webhooks resource with the Get operation, the node retrieves detailed information about a single webhook identified by its unique ID.

Typical use cases include:

  • Fetching configuration details of a specific webhook in Directus.
  • Inspecting webhook properties such as URL, actions, and collections it is associated with.
  • Automating workflows that depend on webhook metadata or status.

For example, you might use this node to get the details of a webhook before updating it or to verify its settings as part of an audit process.

Properties

Name Meaning
ID The primary key (unique identifier) of the webhook to retrieve. This is required to specify which webhook's details to fetch.

Output

The node outputs a JSON object representing the webhook data retrieved from Directus. The structure corresponds to the webhook entity in Directus and typically includes fields such as:

  • id: The webhook's unique identifier.
  • name: The name of the webhook.
  • url: The target URL where the webhook sends requests.
  • actions: The list of actions that trigger the webhook.
  • collections: Collections related to the webhook.
  • Other metadata fields as defined by Directus.

If the webhook data is a primitive type (string, number, boolean), it will be wrapped inside an object with a result property.

No binary data output is produced by this operation.

Dependencies

  • Requires an active connection to a Directus instance via an API key credential.
  • The node uses the Directus REST API endpoints; thus, the Directus server must be accessible from the n8n environment.
  • Proper permissions are needed for the API key to read webhook data.

Troubleshooting

  • Error: "Webhook not found" or 404 response
    Ensure the provided webhook ID exists in the Directus instance and that the API key has permission to access webhooks.

  • Authentication errors
    Verify that the API key credential is valid and has not expired or been revoked.

  • Malformed ID input
    The ID must be a valid string matching the webhook's primary key format in Directus.

  • Network issues
    Confirm that the Directus server URL is reachable from the n8n host.

If the node throws an error, enabling "Continue On Fail" can help process multiple items without stopping the workflow.

Links and References

Discussion