Actions109
- Field Actions
- Item Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Collection Actions
- Extension Actions
- File Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revisions Actions
- Roles Actions
- Settings Actions
- Users Actions
- Utilities Actions
- Webhooks Actions
Overview
The Webhooks → Delete operation in this n8n node allows you to delete a specific webhook from a Directus instance by its primary key (ID). This is useful for automating the management of webhooks, such as cleaning up unused or obsolete webhooks in your Directus project.
Common scenarios:
- Automatically removing webhooks that are no longer needed.
- Cleaning up test or temporary webhooks after integration tests.
- Managing webhook lifecycle as part of a larger automation workflow.
Practical example:
You might use this node in a workflow that disables and then deletes webhooks when a project is archived, ensuring no further external calls are made.
Properties
| Name | Type | Meaning |
|---|---|---|
| ID | String | Primary key of the webhook to be deleted. Required. |
Output
- The output will be a single object under the
jsonfield. - If the deletion is successful, the structure typically contains the response from the Directus API, which may be an empty object or a confirmation message.
- If the response is a primitive value (string, number, boolean), it will be wrapped as
{ "result": <value> }. - If an error occurs and "Continue On Fail" is enabled, the output will contain
{ "error": "<error message>" }.
Example output:
{
"json": {}
}
or, in case of error:
{
"json": {
"error": "Webhook not found"
}
}
Dependencies
- Directus API: Requires access to a Directus instance.
- API Credentials: You must configure the
directusApicredentials in n8n with appropriate permissions to delete webhooks.
Troubleshooting
Common issues:
- Invalid ID: If the provided ID does not correspond to an existing webhook, the API may return an error such as "Webhook not found".
- Insufficient Permissions: The API credentials used must have permission to delete webhooks; otherwise, you may receive a "Forbidden" or "Unauthorized" error.
- Network/Connection Issues: Errors related to connectivity with the Directus server.
Error messages and resolutions:
"Webhook not found": Check that the ID is correct and the webhook exists."Forbidden"or"Unauthorized": Ensure your API credentials have the necessary permissions.- Network errors: Verify the Directus instance URL and network connectivity.