Prerequisites
- Completed Quickstart
- Connecting Slack (for sending messages)
- Basic familiarity with Placeholders and Blocks
Recipe 1: Approval flow with button webhook
Goal: Send a message with Approve/Reject buttons; when the user clicks, POST to your API and optionally update the message. Steps:- Create a webhook destination — Integrations → Webhooks → Create. Set URL (e.g.
https://api.yourcompany.com/approvals), Method POST, and auth headers if needed. See Webhook destinations. - Build the template — Add Header (e.g. “Expense approval”), Section with placeholders (e.g.
Amount: {{expense.amount}},Submitted by {{user.name}}), then an Actions block with two buttons: ”✓ Approve” (Primary, action_idapprove_expense) and ”✗ Reject” (Danger, action_idreject_expense). Set each button’s Value to{{expense.id}}or similar. - Add webhook to each button — In button settings, Add Action → Webhook; select your destination; set payload, e.g.
{ "action": "approve", "expense_id": "{{expense.id}}", "approved_by": "{{interaction.user_email}}" }(and"action": "reject"for the Reject button). See Button webhooks. - Optional: message update — Add a Message Update action (e.g. Replace self) so the button becomes ”✓ Approved” or ”✗ Rejected” after click. See Button message updates.
- Sample data — Add sample data with
expenseanduserso the preview and send work. See Sample data. - Test — Send to a channel, click a button, then check Usage → Interactions for webhook delivery.
Interactive buttons
Add and configure buttons.
Button webhooks
Connect buttons to your API.
Recipe 2: Modal submission to webhook and Slack update
Goal: User opens a modal from a button, fills a form, submits; you POST the form data to your API and append a confirmation line to the original message. Steps:- Webhook destination — Create a destination for your API (e.g. feedback or approval-with-comment endpoint). See Webhook destinations.
- Modal — Create a modal with title and inputs (e.g. Comment text area, Submit/Cancel). Bind inputs to your data model if needed. See Modal basics and Modal data binding.
- On submit — In the modal, under On submit: add Webhook (select destination; payload can include form fields and
{'{'}interaction.user_email{'}'}etc.) and Message update (e.g. Add response block with ”✓ Submitted by{'{'}interaction.user_email{'}'}at{'{'}timestamp{'}'}”). See Modal submissions. - Open modal from a button — In your template, add a button with action “Open modal” and select this modal. When the user clicks, the modal opens; on submit, the webhook fires and the message updates.
- Test — Send the template, click the button, submit the modal; check Usage → Interactions and the updated message.
Modal basics
Create modals and inputs.
Modal submissions
Webhook and message update on submit.
Recipe 3: Table from API data
Goal: Display a list of items (e.g. order line items, tasks) in a table in Slack using a template and sample data that mirrors your API response. Steps:- Sample data — Create sample data with an array of objects, e.g.
itemsortasks, each with fields likename,quantity,price,status. Match the structure your API will send. See Sample data. - Table block — Add a Table block to your template. Set the array path (e.g.
items). Add columns: Header and data path for each field (e.g. Product →name, Qty →quantity, Price →price). Use format strings like${{value}}for currency. See Table blocks (experimental). - Optional: Header and context — Add a Header above the table (e.g. “Order summary”) and a Section or Context below with totals if you compute them in your data.
- Send — When you send the template (from the UI or API), pass the same shape of data (e.g. from your API); the table will render one row per array item.
Sample data
Structure data for templates.
Table blocks
Display tabular data (experimental).
Next steps
Quickstart
Build your first template.
Template design
Best practices for clarity and maintainability.

