Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

The "Webhook - Update" operation in this custom n8n node allows you to update an existing webhook in a Directus system. This is useful when you need to modify the configuration or metadata of a webhook, such as changing its name, URL, or other properties. Common scenarios include automating the management of webhooks for integrations, updating endpoints after infrastructure changes, or programmatically adjusting webhook settings as part of a workflow.

Example use cases:

  • Automatically renaming or reconfiguring webhooks after deploying new services.
  • Updating webhook payloads or triggers based on dynamic business logic.
  • Managing webhook lifecycle as part of CI/CD pipelines.

Properties

Name Meaning
ID Primary key of the webhook. This uniquely identifies which webhook will be updated (e.g., "15").
Data (JSON) A partial webhook object. Provide the fields and values you wish to update in JSON format (e.g., { "name": "Build Website" }).

Output

The output will contain the updated webhook object in the json field. The structure will reflect the webhook's properties as returned by the Directus API after the update. Typical fields may include:

  • id
  • name
  • status
  • url
  • ...and any other webhook attributes supported by Directus.

Example output:

{
  "id": "15",
  "name": "Build Website",
  "status": "active",
  "url": "https://example.com/webhook"
}

Dependencies

  • Directus API: Requires access to a running Directus instance.
  • Authentication: May require an API key or authentication credentials configured in n8n for Directus.
  • n8n Configuration: Ensure that the node is properly configured with the correct Directus credentials and base URL.

Troubleshooting

  • Invalid ID: If the provided "ID" does not correspond to an existing webhook, the node may return a "Not Found" or similar error. Double-check the ID value.
  • Malformed JSON: If "Data (JSON)" is not valid JSON, the node will likely throw a parsing error. Ensure your JSON is correctly formatted.
  • Permission Denied: If the API credentials lack permission to update webhooks, you may receive an authorization error. Verify user roles and permissions in Directus.
  • Network Issues: Errors related to connectivity (timeouts, DNS errors) indicate issues reaching the Directus server.

Links and References

Discussion