Menu

Post image 1
Post image 2
Post image 3
1 / 3
0

Chat SDK now supports callback URLs on buttons and modals - Vercel

Vercel News·Ben Sabic·4 days ago
#uJZpHLzY
Reading 0:00
15s threshold

You can now pause a Workflow run on a Chat SDK card and resume it when someone clicks a button. The same flow works for form submissions. Buttons and modals accept a new callbackUrl prop, and the event payload is sent to that endpoint. Slack approval card for a status report request To build a card like this, create a workflow webhook and pass its URL to each button's callbackUrl prop inside your <Card> component: import { createWebhook } from "workflow" ; import { Card , CardText , Actions , Button } from "chat" ; export async function statusReport ( thread , content : { title : string ; message : string } , ) { "use workflow" ; using hook = createWebhook < { action : "approve" | "approve-and-send" | "deny" } > ( ) ; await thread . post ( < Card title = " Status Report Communications " > < CardText > Title: { content . title } </ CardText > < CardText > Message: { content . message } </ CardText > < Actions > < Button callbackUrl = { hook .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More