Send events from your site to Slack
- Trigger
- POST /relay
- Lands in
- The relay log, plus any channel you route to
- Setup
- 3 min
- Needs
- Anything that can send an HTTP POST

New signup from Dunder Mifflin
[email protected] · via My Site, Signup Page
- Type
- signups
- Plan
- pro
- Campaign
- spring-launch
- Submitted at
- 11:04 AM
Every event type uses the same POST shape. You set where each type lands, and how it batches, in the dashboard.
Create a relay endpoint in the Viably dashboard and attach the Slack channels you want it to use.
Send a POST from your site or backend with the data for the event. Include a type field to route it correctly.
Viably formats the payload and posts it to Slack immediately or in a batched card, depending on how the type is configured.
Environment variables
After creating an endpoint in the dashboard, add these to your project's environment.
Both values are shown in the dashboard immediately after creating an endpoint. Your token is only displayed once, so store it somewhere safe.
TypeScript types
Drop this into your project as viablyTypes.ts. Each event type carries its own recommended fields, and Viably surfaces a hint in Slack when a recommended field is missing.
Sending a payload
A minimal helper and three common usage examples. Any additional fields you include beyond the recognised ones appear in the Slack message as extra context.
Event types
The type field routes the event to the matching Slack message template. If omitted or unrecognised it falls back to others. Viably adds an inline hint to the Slack message when a recommended field is absent.
transaction counts toward your revenue figures, ocr is Viably's own document pipeline, and inbox and reply decide which side of a conversation an email sits on. If you send one of them as your type to a relay endpoint that was not built for it, Viably treats it like any other unrecognised value: the event still reaches Slack under others, with no error returned, and Viably captures no contact or revenue from it.leadgen, signups, contactform, or transaction event also creates or updates a contact, keyed on the email address. The same person's enquiry, signup, and payment land on one record. See the Lightweight CRM guide for what that record does.leadgen, signups, contactform, and transaction, but you should send them. email is the identity key for your Contacts list: a lead captured in June and a payment in July resolve to the same contact. name and company tell your team who they are dealing with. Without them you still get the Slack message, but the contact arrives as a bare email address."My Site, Contact Page". Viably uses this for footer attribution on every message. If omitted, it falls back to the HTTP Referer or Origin header, then to the domain you set on the endpoint in the dashboard.new Date().toISOString(). Viably formats it using your workspace's default timezone and displays it as a Submitted at field in the Slack message. If omitted, no timestamp is shown.Duplicate events
event_id is optional, but it is the most useful optional field on this page. It is your own identifier for the event a payload describes, and Viably uses it to tell when two deliveries are the same event.
event_id and Viably remembers it for 24 hours and drops the second delivery.order_id, and Stripe events on Stripe's own event id. For everything else it compares payloads, and treats an identical body carrying the same email address within ten minutes as one event. Identical bodies further apart count as separate events, such as someone signing up again a week later. An event_id lets Viably tell a retry from a repeat.signup:8814.Don't generate it with
crypto.randomUUID() as you post the webhook. That is worse than sending nothing: Viably trusts a supplied event_id to say which deliveries are the same event, so a fresh one per request means no two deliveries ever match.newsletter:[email protected]:2026-07-30. Subscribing twice in an afternoon then counts as one subscription, and coming back in March counts as a second. Don't make the id stable forever here: someone who resubscribes next month would still post to Slack but never reach your CRM.Custom event types
Viably ships with the six types above, and you can send your own. Set type to any lowercase value up to 64 characters that starts with a letter and uses only letters, digits, and underscores, and it works the first time you send it. support_ticket, plan_upgraded, and nps_response are all valid.
others, and Viably adds the type to your workspace's event catalog. It does not create or update a contact yet. An admin opens the catalog and decides what the type means: whether it captures a lead, a signup, or a customer, and whether your team is expected to reply. Until then, the type only posts messages.type. See Routing multiple event types to send different types to different channels without changing your integration code.others, the same as a malformed one, and the event is still relayed.Reporting
Every event you deliver is recorded for reporting. In the Month in Review area of your dashboard, Viably charts your webhook volume by category across the month.
Channel override
By default, events are posted to the Slack channels you configured on the endpoint. You can override this per event by including a channels array in your payload. If Viably cannot access any of the override channels, it falls back to the endpoint defaults automatically.
Channel IDs can be found by right-clicking a channel in Slack, choosing View channel details, and copying the ID at the bottom.
Routing multiple event types
One endpoint token can carry many kinds of event. Send signups and a custom type like support_ticket through the same token, and both reach Slack, with type deciding which template renders each one. You set any per-type differences in the dashboard.
support_ticket can post immediately to a support channel while signups batches every six hours into a growth channel, and changing one leaves the other as it is.channels per request, and it always wins. An admin sets per-type routing once in the dashboard, and it applies whenever a payload has no channels override. Once routing is set up, most integrations don't need channels at all.What a batched card shows
Batched types wait for the interval you set, then post as one card with a sortable table. Viably builds the columns from the fields in those payloads.
- Recognised fields come first.
name,email,company,amount,plan,statusand the rest of the vocabulary keep a fixed order in every batch of that type. - Then your own fields. Any other value you send becomes a column, ranked by how many events in the batch carry it. A hackathon portal sending
team_nameandrequested_bygets a column for each. Nested objects and arrays are skipped, and so areevent_idandcontact_id. titlenames the kind of event. One kind in the batch and it is stated once above the table. Several kinds and it becomes an Event column, with a count per kind above it.- Numbers sort as numbers. A field whose every value is a number gets a column that sorts by size, so a score of 80 ranks above a score of 9. The When column also shows the date once a batch spans more than one day.
- A
sourceevery event shares moves to the footer. A mixed batch keeps it on each row, where it tells otherwise identical rows apart.
message, which is placed last. A card holds seven columns and a hundred rows, ten to a page. Send more fields than that and the card names the ones it could not fit. A batch that holds a single event posts the normal single-event card instead.Auto-create tasks
Every endpoint has an optional Spawn a task toggle in the dashboard. When it is on, each delivered event also creates a task, posted as a claimable card threaded under the Slack notification.
- Assign it, or leave it up for grabs. Route the task to a specific teammate, or leave it unassigned so anyone can claim it in Slack.
- It is a real task. The card carries Claim and Mark Done buttons, and the task shows up on your board, in the Weekly Digest, and in follow-ups, like any task created by a clipboard reaction.
- Non-Stripe endpoints spawn a task on every single non-batch delivery, one per lead, contact-form fill, signup, deploy, and so on.
Stripe Integration
Viably can receive events directly from Stripe and post them to Slack. Stripe webhook destinations post to a plain URL, so use the query-param token format instead of the Bearer authorization header.
- 1Create a relay endpoint
In the Viably dashboard, create a new relay endpoint with Stripe Integration enabled. Once created, open the token dialog and copy the Stripe or query-param URL. It looks like
https://hq.viably.app/relay?token=…. - 2Create a webhook destination in Stripe
In your Stripe Dashboard, go to Developers > Webhooks > Add destination. Paste the Viably query-param URL as the Endpoint URL. Select these two events:
charge.succeededandcustomer.subscription.updated.charge.succeededcovers every successful transaction, whether it came from Stripe Checkout or from your own integration using Stripe's APIs. Viably reads theamount,currency, anddescriptionfrom its payload to build your transaction messages in Slack.
Don't send any other Stripe events to this Webhook Relay endpoint. They can flood your workspace with messages and cause double notifications or double-counted revenue. - 3Copy the signing secret
After saving, Stripe displays a signing secret beginning with
whsec_. Copy it to complete your setup on Viably. If you miss it, you can reveal or roll it from the destination details page. - 4Complete setup in Viably
Back in the Viably dashboard, click Edit on the relay endpoint. Paste the
whsec_…value into the Stripe webhook secret field and save. Viably will now verify every incoming Stripe request and reject anything unsigned. - 5Test it
Use Stripe's Send test event button on the destination page to fire a sample event. Check your configured Slack channel, where you should see a formatted message within a few seconds.
Authorization headers. The ?token=… format is the Viably-supported alternative for these integrations, and both URLs are shown in the token dialog after endpoint creation.Campaign attribution
Most teams can tell you how many people a campaign reached, but few know what those people went on to spend. Viably records the campaign when it captures the contact, and all it needs is the page URL your form already has.
current_page_url in your payload and Viably reads utm_source, utm_medium, utm_campaign, utm_content, utm_term, utm_id, and utm_authoroff the query string your ad platform appended when the visitor clicked. If you post your own JSON and don't have the URL, send those fields directly and Viably reads them the same way.fbclid, gclid, and the hsa_*cluster. Each one shows up as its own entry under Captured data on the contact, and you can promote it into a field when you want to match it against your ad platform's reporting. A new parameter from a new platform is captured the same way, with no extra setup.UTM source, UTM medium, and UTM campaign columns beside the source, ready to pivot by campaign. Contacts captured before you started tagging links have empty cells in those columns. The columns stay fixed, so a pivot you built keeps working next month.city, plan, or your own custom metadata. Viably renders them as additional context in the Slack message. current_page_url is also read for campaign tags, as covered above.Nothing. Viably hosts the endpoint, so your app only needs to send a single POST request.
Yes. The payload's type field picks the Slack template and routing, so one endpoint can handle signups, contact forms, deployments, and custom events.
Yes. Person events create or update a contact, so a signup, form submission, and payment can all land on the same record.
Yes. Each endpoint has default channels, and any payload can override them with a channels array.
Create your first endpoint from the Webhook Relay page. It takes one POST to see an event land in Slack.
Add Viably to Slack