Webhook Event
The Webhook Notification Event feature allows users to configure and manage webhook notifications that send alerts to external systems based on specific triggers. This guide covers the setup of webhook notifications, validating their configuration, and handling webhook signatures.
Overview
Webhook Notifications are used to send alerts to an external URL when certain events occur. The setup includes defining the webhook URL, client credentials, and the payload format. This feature ensures that external systems are notified about important updates in real-time.
Configuring a Webhook Notification Event
Configure Webhook Notification Event
To set up a webhook notification event:
- Title: Enter a descriptive title for the notification.
- Description: Provide a description of the notification event.
- Webhook URL: Specify the URL where the webhook notifications will be sent.
- Client ID: Enter the client ID for authentication.
- Secret Key: Provide the secret key for secure communication.
- Notification Subject: Define the subject line for the notification.
- Payload: Format the data to be sent in the notification.
- Notification Settings: Include additional settings for the notification content.
Steps:
- Alice Johnson is setting up a "Webhook Notification" event.
- Enter the following details:
- Title:
Database Backup Notification
- Description:
Notification for database backup completion
- Webhook URL:
https://example.com/webhook
- Client ID:
client_123
- Secret Key:
secret_key_abc
- Notification Subject:
Database Backup Completed
- Payload:
{ "status": 200, "client_id": "client_123", "subject": "Database Backup Completed", "content": {} }
- Notification Settings:
{ "content": "Database backup has been completed successfully." }
- Title:
- Save the configuration.
Outcome: The Webhook Notification event will be configured with the specified title, description, URL, client ID, secret key, subject, payload, and settings.
Validate Webhook Notification Configuration
To ensure the webhook notification is configured correctly:
- Action: Review the configured details.
Expected Outcome:
- Alice Johnson should see the configured values for:
- Title
- Description
- Webhook URL
- Client ID
- Secret Key
- Notification Subject
- Payload
- Notification Settings
Trigger Webhook Notification Event
To activate the webhook notification event based on predefined conditions:
-
Given: The "Webhook Notification" event is configured and the trigger conditions are met (e.g., database backup completion).
-
When: The trigger conditions are fulfilled.
Expected Outcome:
- The external application should receive a notification with:
- Title:
Database Backup Notification
- Description:
Notification for database backup completion
- Webhook URL:
https://example.com/webhook
- Client ID:
client_123
- Secret Key:
secret_key_abc
- Notification Subject:
Database Backup Completed
- Payload:
{ "status": 200, "client_id": "client_123", "subject": "Database Backup Completed", "content": {} }
- Notification Settings:
{ "content": "Database backup has been completed successfully." }
- Title:
Validate Webhook Signature
To verify the authenticity of the webhook request:
-
Action: Send a POST request to the validation endpoint with the following details:
- URL:
https://api.dev.example.com/api/v1/workflow/validate-signature
- Client ID:
client_123
- Signature:
generated_signature
- URL:
-
Expected Outcome:
- If the signature is correct:
- Status:
200
- Message:
Signature verified
- Status:
- If the signature is incorrect:
- Status:
403
- Message:
Signature not verified
- Status:
- If the signature is correct:
Summary
The Webhook Notification Event Setup feature enables users to configure webhook notifications and validate their setup. By defining the necessary details and verifying signatures, users can ensure that notifications are sent accurately and securely to external systems.