Actions111
- Item Actions
- Webhook Actions
- Collection Actions
- File Actions
- Activity Actions
- Asset Actions
- Authentication Actions
- Extension Actions
- Field Actions
- Folder Actions
- Permission Actions
- Preset Actions
- Relation Actions
- Revision Actions
- Role Actions
- Setting Actions
- User Actions
- Utility Actions
Overview
This node allows you to create a new webhook in your system. It is designed for scenarios where you want to automatically notify an external service (via HTTP request) when certain events occur in your application, such as the creation, update, or deletion of items in specified collections. For example, you might use this node to trigger a deployment pipeline when a new article is published, or to synchronize data with another platform whenever records are updated.
Properties
| Name | Meaning |
|---|---|
| Name | Name for the webhook. Shown in the Admin App. |
| Actions | When to fire the webhook. Can contain one or more of: Create, Update, Delete. |
| Collections | What collections to fire this webhook on. You can select multiple collections (e.g., "articles"). |
| URL | Where to send the webhook request (the destination endpoint URL). |
| JSON/RAW Parameters | Whether the query and/or body parameter should be set via the value-key pair UI or as JSON/RAW input. |
| Body Parameters | Body parameters as JSON or RAW. Only shown if "JSON/RAW Parameters" is enabled. |
Output
The node outputs a json field containing the result of the webhook creation operation. The structure typically includes details about the newly created webhook, such as its ID, name, actions, collections, and target URL. The exact fields depend on the underlying API response, but you can expect a summary similar to:
{
"id": "webhook_123",
"name": "Build Website",
"actions": ["create", "update"],
"collections": ["articles"],
"url": "https://example.com/",
"status": "active"
}
Note: This node does not output binary data.
Dependencies
- Requires access to the Directus API or a compatible backend that supports webhook management.
- May require authentication credentials or API keys configured in n8n, depending on your setup.
Troubleshooting
- Missing Required Fields: If required properties like "Name," "Actions," "Collections," or "URL" are missing, the node may throw validation errors. Ensure all mandatory fields are filled.
- Invalid URL: If the provided URL is malformed or unreachable, the webhook creation will fail. Double-check the URL format and network accessibility.
- Permission Issues: If your API credentials lack permission to create webhooks, you may receive authorization errors. Verify user roles and permissions in your backend.
- Incorrect JSON in Body Parameters: If using JSON/RAW mode, ensure the JSON syntax is valid to avoid parsing errors.