Automate Your Notification Workflows
Build multi-step notification sequences with conditional logic, delays, and automatic triggers. Respond to webhooks, API calls, and business events with powerful automation.
{
"key": "integration.stripe.charge.succeeded",
"steps": [
{
"command": "broadcast",
"input": {
"title": "Payment received!",
"content": "Thank you for your payment of ${{amount}}",
"category": "billing",
"recipients": [{"email": "{{customer.email}}"}]
}
},
{
"command": "wait",
"input": {"duration": 3600}
},
{
"command": "broadcast",
"if": "{{data.premium}} == true",
"input": {
"title": "Welcome to Premium!",
"content": "Enjoy your new features",
"recipients": [{"email": "{{customer.email}}"}]
}
}
]
}Trusted by 1,000+ companies
Powerful Workflow Automation
Everything you need to build sophisticated notification flows that respond to your business logic.
Sequential Steps
Execute commands in order, building complex flows from simple building blocks.
Conditional Logic
Branch your workflows based on user data, event properties, or any custom condition.
Delays & Wait
Pause workflow execution for hours or days, perfect for drip campaigns and follow-ups.
Webhook Triggers
Automatically execute workflows when external events occur from Stripe, GitHub, and more.
Template Variables
Reference event data with liquid templates for dynamic, personalized notifications.
API Control
Trigger, monitor, and manage workflow runs programmatically via REST API.
Available Workflow Commands
Build workflows using these powerful commands. More commands coming soon.
broadcastSend a notification broadcast to users via any channel (in-app, email, Slack, etc.).
waitPause workflow execution for a specified duration (in seconds) before continuing.
pauseTemporarily suspend workflow execution until manually resumed via API.
abortPermanently stop workflow execution. Cannot be resumed once aborted.
Real-World Workflow Scenarios
See how workflows solve common notification challenges.
Payment Confirmation Flow
When a Stripe payment succeeds, send immediate in-app notification, wait 1 hour, then send follow-up email to premium customers only.
User Onboarding Sequence
Guide new users through setup with a series of timed notifications over their first week.
Alert Escalation
Escalate unresolved support tickets automatically, notifying team leads if no response within SLA.
Conditional Campaign
Send targeted messages based on user behavior and properties with smart branching logic.
How to Execute Workflows
Workflows can be triggered manually via API or automatically via webhooks.
API Trigger
Trigger workflows programmatically from your application code. Perfect for user actions, scheduled jobs, or custom business logic.
curl -X POST https://api.magicbell.com/workflows/runs \
-H "X-MAGICBELL-API-KEY: your-api-key" \
-H "X-MAGICBELL-PROJECT-ID: your-project-id" \
-H "Content-Type: application/json" \
-d '{
"key": "user.onboarding",
"input": {
"user": {
"id": "usr_12345",
"email": "user@example.com",
"name": "John Doe"
}
}
}'Webhook Trigger
Workflows automatically execute when external webhooks arrive. Name your workflow with the pattern integration.{provider}.{event} to enable automatic triggering.
POST /webhooks/stripe → charge.succeededintegration.stripe.charge.succeededIf found → creates workflow runTemplates can reference {{amount}}, {{customer.email}}, etc.{
"key": "integration.stripe.charge.succeeded",
"steps": [
{
"command": "broadcast",
"input": {
"title": "Payment Received",
"content": "Charge ID: {{id}}, Amount: ${{amount}}",
"recipients": [{"email": "{{customer.email}}"}]
}
}
]
}Supported Integrations
Workflows automatically trigger for any integration that sends webhooks to MagicBell.
