Slack Destination
The Slack destination sends formatted messages to a Slack channel via incoming webhooks.
Configuration
Section titled “Configuration”{ "destination_type": "slack", "name": "Payment Alerts", "config": { "webhook_url": "https://hooks.slack.com/services/T.../B.../xxx" }}| Field | Required | Description |
|---|---|---|
webhook_url | Yes | Slack incoming webhook URL |
Message Format
Section titled “Message Format”Slack messages use Block Kit formatting and include:
- Provider — The webhook provider name
- Account — The account slug
- Event Type — The event type
- Event ID — The Transyt event ID
- Dashboard Link — A button linking to the event in the Transyt dashboard
- In Slack, go to your workspace’s Apps settings
- Create a new app (or use an existing one) and enable Incoming Webhooks
- Add a new webhook to your desired channel
- Copy the webhook URL
Example
Section titled “Example”Alert a Slack channel when high-value payments fail:
curl -X POST https://ingest.transyt.com/admin/accounts/{account_id}/destinations \ -H "X-Admin-Token: YOUR_ADMIN_TOKEN" \ -H "Content-Type: application/json" \ -d '{ "destination_type": "slack", "name": "High-Value Payment Failures", "config": { "webhook_url": "https://hooks.slack.com/services/T.../B.../xxx" }, "condition": "event_type == \"charge.failed\" and payload.get(\"amount\", 0) > 10000" }'Timeout
Section titled “Timeout”Slack webhook requests have a 10-second timeout.