Setting Up Triggers
Listen for real-time events from third-party services with webhook-based triggers.
Triggers let you receive real-time events from third-party services. When something happens — like a new Slack message, a GitHub push, or a form submission — Weavz delivers the event data to your callback URL.
Weavz supports two trigger types:
- WEBHOOK — the third-party service pushes events to a Weavz-managed URL, which forwards them to your callback
- POLLING — Weavz periodically checks the service for new data and delivers any changes to your callback
Both types deliver events in the same format to your callbackUrl.
Enable a Trigger
Navigate to Triggers
Open the dashboard and go to Triggers in the sidebar.
Enable a new trigger
Click Enable Trigger. Select an integration (e.g. GitHub, Slack) and pick the trigger event you want to listen for.
Select a connection
Choose the connection that has access to the service you want to monitor.
Set your callback URL
Enter the HTTPS URL where Weavz should deliver events. Optionally add callback headers and metadata.
Save
Click Enable. For webhook triggers, the webhook is automatically registered with the third-party service.
Test a Trigger
Get sample event data for a trigger to verify your callback handler before going live.
Go to Triggers, find the trigger you want to test, and click Test. Weavz will show a sample payload for that trigger type.
Handling Webhook Events
When a trigger fires, Weavz sends a POST request to your callbackUrl:
POST https://yourapp.com/webhooks/github-push
Content-Type: application/json
{
"triggerSourceId": "ts_abc123",
"integrationName": "github",
"triggerName": "new_push",
"data": {
"ref": "refs/heads/main",
"repository": { "full_name": "my-org/my-repo" },
"commits": [...]
},
"metadata": {},
"timestamp": "2025-01-15T10:35:00Z"
}Return a 200 status from your callback endpoint within a few seconds. Events may be delivered more than once — design your handler to be idempotent.
You can include custom headers and metadata when enabling a trigger. Headers are sent with every callback delivery, useful for authentication:
curl -X POST https://api.weavz.io/api/v1/triggers/enable \
-H "Authorization: Bearer wvz_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"integrationName": "slack",
"triggerName": "new_message",
"callbackUrl": "https://yourapp.com/webhooks/slack",
"connectionExternalId": "my_slack",
"callbackHeaders": {
"X-Webhook-Secret": "your_secret_value",
"X-Tenant-ID": "tenant_123"
},
"callbackMetadata": {
"tenantId": "tenant_123",
"environment": "production"
}
}'Metadata is included in the metadata field of every callback delivery.
Disable a Trigger
Stop receiving events by disabling the trigger source.
Go to Triggers, find the active trigger, and click Disable. The webhook is automatically deregistered from the third-party service.
Listing Active Triggers
curl https://api.weavz.io/api/v1/triggers \
-H "Authorization: Bearer wvz_your_api_key"Best Practices
- Use HTTPS callback URLs — ensure your endpoint is accessible over HTTPS
- Verify callbacks — use
callbackHeaderswith a secret to verify requests are from Weavz - Respond quickly — return a
200status within a few seconds - Handle duplicates — events may be delivered more than once; make your handler idempotent
- Monitor active triggers — regularly review and disable triggers you no longer need