Webhook to Slack: building an event-driven workforce
A signup, a payment, or a failed deploy is worth far more when your team sees it the moment it happens. This is a complete guide to sending any webhook to Slack, with reliable delivery, automatic follow-up tasks, reporting, and logs, all set up from a single slash command.
Every workday your systems produce a steady stream of small, important facts. Someone signs up for the product. A payment clears. A deploy finishes, or fails halfway through. A lead fills in a form on the marketing site at two in the morning. Someone on your team would act on each of these if they saw it in time, but most of them land in a database row, an email no one opens, or a dashboard people check once a week.
In an event-driven workforce, each event reaches the people who care about it, in the tool they already use all day. For most teams that is Slack. This guide shows how to send any webhook to Slack and build a real workflow around it, from the first delivery to the reporting and diagnostics you will rely on months later. The examples use Viably's Webhook Relay, though the same ideas apply to any event you can POST from one system to another.
What an event-driven workforce actually means
In practice it means your team reacts to things as they happen instead of finding them later in a review. A support lead sees the enterprise trial sign up the moment the form is submitted. Finance watches revenue arrive in a channel through the day instead of reconciling it on Friday. Whoever is on call learns that the nightly deploy failed from a message in their channel, before a customer reports it.
Viably groups these signals into a handful of event types so each one arrives formatted for what it is. A transaction reads as a payment card with an amount and a customer. A signups event announces a new account. leadgen captures downloads and gated content fills, contactform handles enquiries, and devops carries deploy and CI results. Anything else comes through as others.
From event to an owned follow-up
Seeing an event is useful, but someone still has to act on it.
Each relay endpoint can spawn a task on delivery. When you turn the option on, every qualifying event posts its Slack message and then drops a task card underneath it. You can assign that task to someone, or leave it up for grabs and let whoever is free claim it in Slack. For payment endpoints connected to Stripe you can also choose which events get a task, so a new subscription or a scheduled cancellation raises one while routine successful charges only post. When a cancellation lands in the channel with a task assigned to someone in customer care, your team gets a chance to save that customer before the number dips at the end of the month.
Delivery you can actually trust
Delivery has to hold up when Slack has a brief outage, your own server sends a burst of events during a launch, or a network hiccup drops a request. If any of these loses an event, people stop trusting the channel.
Every endpoint retries on failure with exponential backoff, and you can set the number of attempts anywhere from one to ten, depending on how important that stream is. Payment events are de-duplicated by charge id before anything is counted or posted, so a webhook that Stripe re-delivers, which it does routinely, never shows up twice or inflates a total. When a source produces more volume than a channel can comfortably absorb, batch mode holds the events and posts a single summary instead of a flood. You choose how the batch flushes: on a schedule every few hours, once a certain number of events accumulate, or a hybrid of the two that sends whenever the first condition is met. High-value payment relays can also post a periodic revenue report on their own schedule.
Your app POSTs the event once and moves on. Viably handles the retries, ordering, de-duplication, and batching on the receiving side.
Reporting and stats
After a few weeks of events in Slack, people want numbers: signups last month, whether transaction volume is climbing, which category is slowest. Getting them usually means exporting the data and building a chart by hand.
Viably keeps the answer next to the events. The Month in Review area of your dashboard charts every relayed event by category, one line per stream, so payments, signups, and leads each get their own colour. A cumulative toggle switches from daily volume to a running month-to-date total, which shows whether a number is growing. The chart uses the events you already relay, so you have nothing extra to instrument. On the paid plan it also looks back across earlier months.
Logs and diagnosis when something looks off
Sooner or later someone asks whether an event actually arrived, and if not, why. That person is usually mid-incident, so they need the answer fast.
Each endpoint keeps its own activity log with a clear tally of what happened. You can see how many events were delivered, how many failed, and how many were dropped, alongside the time of the most recent one. When batch mode is on, a separate view lists the events currently queued and waiting for their next flush, and a Flush Now control sends them immediately when you would rather not wait. Failed deliveries carry enough context to point at the cause, whether that is a channel the bot was removed from or a payload that arrived malformed. If a token is ever exposed, you rotate it in place: the old one stops working at once, and the endpoint and its history stay as they are.
Setup is a single slash command
Setting up a relay takes about a minute. Inside Slack you run /webhook-relay, which opens the endpoints for your workspace, and you create one for the source you want to connect. You can also manage everything from the web command center if you prefer a larger canvas. Either way you get a relay URL and a bearer token, and your app starts posting to it.
POST a JSON body with a title, some text, and optional fields, include the token, and Viably formats a tidy Block Kit message and delivers it to the channels you chose. Services that cannot set an Authorization header, Stripe among them, can pass the token as a query parameter instead, so you need no proxy in front of them. All of this is available on the free plan, including retries, reporting and logs.
POST https://hq.viably.app/relay
Authorization: Bearer <your-token>
Content-Type: application/json
{
"type": "signups",
"title": "New Pro signup",
"source": "app.example.com",
"fields": { "Plan": "Pro", "Seats": 12 }
}
Where to go next
Once the webhook is sending, you still need to decide which events get a channel and who owns each one. Part two of this series covers that.
When you are ready to wire up a source, the Webhook Relay guide covers the generic payload in full, and Stripe to Slack walks through payments end to end. If you would rather start by seeing an event land in your own channel, add Viably to Slack and run /webhook-relay.