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.

Workflow Definition
{
  "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

StacksiGitBookPitchEllipsusWinampSifted
Features

Powerful Workflow Automation

Everything you need to build sophisticated notification flows that respond to your business logic.

Sequential Steps

Sequential Steps

Execute commands in order, building complex flows from simple building blocks.

Conditional Logic

Conditional Logic

Branch your workflows based on user data, event properties, or any custom condition.

Delays & Wait

Delays & Wait

Pause workflow execution for hours or days, perfect for drip campaigns and follow-ups.

Webhook Triggers

Webhook Triggers

Automatically execute workflows when external events occur from Stripe, GitHub, and more.

Template Variables

Template Variables

Reference event data with liquid templates for dynamic, personalized notifications.

API Control

API Control

Trigger, monitor, and manage workflow runs programmatically via REST API.

Commands

Available Workflow Commands

Build workflows using these powerful commands. More commands coming soon.

broadcast

Send a notification broadcast to users via any channel (in-app, email, Slack, etc.).

wait

Pause workflow execution for a specified duration (in seconds) before continuing.

pause

Temporarily suspend workflow execution until manually resumed via API.

abort

Permanently stop workflow execution. Cannot be resumed once aborted.

Examples

Real-World Workflow Scenarios

See how workflows solve common notification challenges.

Payment

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.

1. broadcast → In-app receipt
2. wait → 3600 seconds
3. broadcast → Email (if premium)
Onboarding

User Onboarding Sequence

Guide new users through setup with a series of timed notifications over their first week.

1. broadcast → Welcome message
2. wait → 86400 seconds (1 day)
3. broadcast → Feature tutorial
4. wait → 259200 seconds (3 days)
5. broadcast → Feedback request
Support

Alert Escalation

Escalate unresolved support tickets automatically, notifying team leads if no response within SLA.

1. broadcast → Notify agent (Slack)
2. wait → 1800 seconds (30 min)
3. broadcast → Escalate to lead
Marketing

Conditional Campaign

Send targeted messages based on user behavior and properties with smart branching logic.

1. broadcast → In-app (all users)
2. broadcast → Email (if paying)
3. broadcast → SMS (if opted-in)
Triggers

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.

Execute Workflow via API
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.

1.
Stripe sends webhook to MagicBell
POST /webhooks/stripe → charge.succeeded
2.
MagicBell constructs workflow key
integration.stripe.charge.succeeded
3.
Looks up matching workflow
If found → creates workflow run
4.
Webhook payload becomes input
Templates can reference {{amount}}, {{customer.email}}, etc.
Example: Stripe Integration
Webhook Workflow Configuration
{
  "key": "integration.stripe.charge.succeeded",
  "steps": [
    {
      "command": "broadcast",
      "input": {
        "title": "Payment Received",
        "content": "Charge ID: {{id}}, Amount: ${{amount}}",
        "recipients": [{"email": "{{customer.email}}"}]
      }
    }
  ]
}
Integrations

Supported Integrations

Workflows automatically trigger for any integration that sends webhooks to MagicBell.