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
Overview
This node integrates with the Directus API to manage webhooks among many other resources. Specifically, for the Webhooks - Update operation, it allows users to update an existing webhook by specifying its unique ID and providing partial webhook data in JSON format. This is useful when you want to modify webhook configurations such as changing the URL, actions, or collections that trigger the webhook without recreating it from scratch.
Common scenarios:
- Updating the target URL of a webhook after a service endpoint changes.
- Modifying which actions (create, update, delete) trigger the webhook.
- Adjusting collections or filters associated with the webhook.
Practical example:
You have a webhook that notifies your application when items are created in a collection. You want to update this webhook to also notify on item updates. Using this node's update operation, you provide the webhook ID and JSON data specifying the new actions array including "update".
Properties
| Name | Meaning |
|---|---|
| ID | The primary key (unique identifier) of the webhook to update. |
| Data (JSON) | A partial webhook object in JSON format containing the fields to update. For example, changing the name, URL, actions, or collections. |
Output
The output is a JSON object representing the updated webhook as returned by the Directus API. It contains the webhook's current state after the update, including all its properties such as id, name, url, actions, collections, and any other metadata.
If the update is successful, the output will be the updated webhook object. If there is an error, the output may contain an error message depending on the node's error handling settings.
Dependencies
- Requires a valid connection to a Directus instance via an API key credential or equivalent authentication token.
- The node uses the Directus REST API endpoints to perform operations.
- No additional external dependencies beyond the Directus API and n8n environment.
Troubleshooting
- Invalid ID: If the provided webhook ID does not exist, the API will return an error indicating the webhook was not found. Verify the ID is correct.
- Malformed JSON: The "Data (JSON)" property must be valid JSON. Invalid JSON syntax will cause parsing errors before the request is sent.
- Insufficient permissions: The API user must have permission to update webhooks. Lack of permissions will result in authorization errors.
- Network issues: Connectivity problems to the Directus server will cause request failures.
- API errors: Any errors returned by the Directus API (e.g., validation errors on fields) will be passed through. Review the error messages for details.
To resolve errors:
- Double-check the webhook ID.
- Validate the JSON input.
- Ensure API credentials have proper permissions.
- Check network connectivity and Directus server status.