Your First Real Workflow
Build a workflow that responds to webhooks and sends notifications
Your First Real Workflow
In this tutorial, you'll build a real-world workflow that:
- Triggers when a Stripe payment is received
- Transforms the payment data
- Sends a Slack notification
Prerequisites
- Completed the Quickstart
- A Slack workspace (for notifications)
- Optional: Stripe account (for live testing)
What We're Building
When a payment is received in Stripe, the workflow will send a message to your Slack channel with payment details.
Step 1: Create the Workflow
Create a workflow with a webhook trigger:
Save the workflow ID from the response.
Step 2: Connect Slack
Before activating, connect your Slack workspace:
This returns a URL to complete the Slack OAuth flow:
Visit the URL, authorize your workspace, and you'll be redirected back.
Step 3: Activate the Workflow
Step 4: Configure Stripe Webhook
Add your webhook URL to Stripe's dashboard:
Or for local development with a tunnel like ngrok:
Select the events:
payment_intent.succeededcharge.succeeded
Step 5: Test the Workflow
You can test without Stripe by manually triggering the workflow:
You should see a message in your #payments Slack channel!
Understanding the Workflow
Trigger Configuration
type: "webhook"- Triggered by incoming webhooksprovider: "stripe"- Expects Stripe webhook format and signature verificationevents- Only trigger on these specific event types
Template Variables
The workflow uses template variables to access data:
| Variable | Description |
|---|---|
{{input.*}} | Access webhook payload data |
{{steps.{id}.output.*}} | Access output from previous steps |
{{now}} | Current timestamp |
Transform Step
The transform step maps input data to a new structure. You can:
- Rename fields
- Compute values (like dividing cents by 100)
- Combine fields
Slack Step
The Slack building block supports:
sendMessage- Send to channel or DMsendEphemeral- Visible to one user onlyaddReaction- Add emoji reaction- And more (see Slack Block docs)
Adding Conditional Logic
Let's enhance the workflow to only notify for payments over $100:
Viewing Run History
Check workflow run history:
Get details for a specific run:
The response shows each step's status, timing, and output: