Actions4
- Resource Actions
Overview
This node integrates with the iTwin Webhooks API to manage event subscriptions and webhook configurations. It allows users to update existing webhooks by modifying properties such as the webhook's secret, active status, callback URL, subscribed event types, and custom payload options.
Common scenarios for this node include:
- Updating a webhook's callback URL when the receiving endpoint changes.
- Activating or deactivating a webhook to control event forwarding without deleting the subscription.
- Changing the secret used for securing webhook requests.
- Adjusting which event types the webhook listens to.
- Customizing the payload sent with webhook events.
Practical example: A user wants to temporarily stop receiving webhook events during maintenance by setting the webhook to inactive, then later reactivates it without recreating the webhook.
Properties
| Name | Meaning |
|---|---|
| Webhook ID | The unique identifier of the webhook to update. |
| Secret | Optional secret string for securing webhook requests. If not provided, a new one will be generated. |
| Active | Boolean flag indicating if the webhook is actively forwarding events (true) or stopped (false). |
| Callback URL | The URL where webhook events are sent. |
| Event Types | JSON array listing the event types the webhook subscribes to. |
| Options | Collection of additional options: |
| - Custom Payload | Option to override the request body with a custom JSON payload. Includes: |
| -- Use Custom Payload | Boolean to enable or disable sending a custom payload instead of the default. |
| -- JSON Payload | The custom JSON payload to send when enabled. |
Output
The node outputs an array of JSON objects representing the result of the update operation. Each output item contains a json property with the response data from the API call. The structure depends on the API response but generally includes details about the updated webhook.
No binary data output is produced by this node.
Dependencies
- Requires an API authentication token credential for the iTwin platform (OAuth2).
- Uses an internal OpenAPI interpreter module to execute operations against the iTwin Webhooks API.
- No additional environment variables are explicitly required beyond standard n8n credential setup.
Troubleshooting
- Unknown operation error: If the specified operation is not recognized, ensure the "Update webhook" operation is selected correctly.
- Invalid Webhook ID: Providing an incorrect or non-existent webhook ID will cause the API to fail. Verify the webhook ID before updating.
- Malformed JSON in Event Types or Custom Payload: Since these fields expect JSON input, invalid JSON syntax will cause errors. Validate JSON formatting carefully.
- API Authentication Errors: Ensure the API key or OAuth2 credentials are valid and have sufficient permissions to update webhooks.
- Network or API downtime: Temporary connectivity issues may cause failures; retry after some time.
If the node is set to continue on failure, errors will be returned in the output JSON under an error property with a descriptive message.
Links and References
- iTwin Developer Documentation
- Webhook Management Concepts (general reference, if available)