Skip to main content
Build a user onboarding automation that sends a welcome message, waits a day, checks whether the user completed setup, and branches to either a follow-up nudge or a silent exit. You’ll build the entire workflow visually in the Automations Designer, then invoke it via API. By the end you’ll know how to add and connect nodes, configure conditional logic, pass dynamic data, test with the debugger, and publish.

Prerequisites

  • A Courier account with at least one configured provider (e.g. SendGrid)
  • Two published notification templates:
    • WELCOME_EMAIL - the welcome message sent immediately
    • ONBOARDING_NUDGE - the follow-up sent to users who haven’t completed setup
  • Your Courier API key (found in Settings > API Keys)
  • An endpoint that returns onboarding status for a user (e.g. GET https://api.example.com/users/:id/onboarding)
New to Courier templates? Follow Design and Send Your First Notification to create and publish a template before starting this tutorial.

What You’ll Build

The finished automation looks like this:
  1. API Invoke trigger - starts the workflow when you call the API
  2. Send node - delivers the welcome email
  3. Delay node - waits 1 day
  4. Fetch Data node - calls your API to check onboarding status
  5. If node - branches on data.onboarding_complete
    • True branch - user finished setup, automation ends
    • False branch - Send node delivers the follow-up nudge
Complete onboarding automation flow

Build the Automation

1

Create a new automation

Navigate to Orchestration > Automations and click + New. Rename it from “Untitled Automation” to something descriptive like “User Onboarding”.
Automations list page with New Automation button
The canvas starts with a placeholder trigger node and an empty action slot.
2

Configure the API Invoke trigger

The default trigger is API Invoke, which is what we want. This means the automation runs when you call POST /automations/:template_id/invoke.Click the trigger node to open its configuration. No changes are needed for the default API invoke; just confirm it’s selected.
API Invoke trigger configuration
3

Add a Send node for the welcome email

From the node palette on the left, drag a Send node onto the canvas. Then connect it to the trigger node by clicking and dragging from the dot on the side of the Invoke node to the dot on the side of the Send node.Click the Send node to configure it:
  • Template: Select your WELCOME_EMAIL templated
  • To: Set the recipient to refs.data.user_id (this references the user_id passed in the API call)
  • Ref: Set to welcome (optional; lets later nodes reference this send’s status)
Send node configuration for welcome email
4

Add a Delay node

Drag a Delay node onto the canvas and connect it to the Send node by clicking and dragging between the dots on the sides of each node.Click the Delay node and set:
  • Duration: 1 day
Delay node configured for 1 day
Delay steps have a 5-15 minute variance in processing time. For precise scheduling, you can use the until field with an ISO 8601 timestamp instead.
5

Add a Fetch Data node to check onboarding status

Drag a Fetch Data node below the Delay node and connect them.Click the Fetch Data node and configure:
  • URL: Your API endpoint with the user ID interpolated from run context, e.g. https://api.example.com/users/USER_ID/onboarding. Use Courier’s interpolation syntax to inject refs.data.user_id into the URL.
  • Method: GET
  • Merge Strategy: overwrite (writes the API response into the automation’s data context)
If your API requires authentication, expand the Headers section and add an Authorization header (e.g. Bearer YOUR_API_KEY). See Fetch Data authentication patterns for options.
Fetch Data node configuration
Your API should return an object like:
{
  "onboarding_complete": true
}
After this node runs, data.onboarding_complete is available to subsequent nodes.
6

Add an If node to branch on onboarding status

Drag an If node below the Fetch Data node and connect them.Click the If node and configure the condition:
  • Source: Data
  • Field: onboarding_complete
  • Comparison: is
  • Value: true
The If node creates two branches: True (user completed onboarding) and False (user hasn’t completed onboarding).
If node condition configuration
7

Add a Send node to the False branch

Drag another Send node onto the canvas and connect it to the False output of the If node.Configure this Send node:
  • Template: Select your ONBOARDING_NUDGE template
  • To: refs.data.user_id
The True branch has no nodes connected to it; the automation simply ends if the user has already completed onboarding.
Send node on the False branch of the If node

Test with the Debugger

Before publishing, test the automation with the built-in debugger. The debugger executes a real run, so the Fetch Data node will actually call your URL; make sure your onboarding status endpoint is running before testing.
1

Create a test event

Click the Debug tab in the designer. Create a test event with data for an existing user:
{
  "data": {
    "user_id": "user_123",
    "user_name": "Jane"
  },
  "profile": {
    "email": "jane@example.com"
  }
}
Debugger test event configuration
2

Run and inspect

Click Run to simulate the automation. Click each node to inspect the data flowing through it. After the Fetch Data node, you should see onboarding_complete in the run context, and the If node should follow the expected branch.
Debugger showing node-level data inspection

Publish and Invoke

1

Publish the automation

Click the Publish button in the upper-right corner. Review the changes in the diff view and confirm.
Publish diff view
2

Invoke from the Invoke tab

Click the Invoke tab. Courier generates a ready-to-use curl command with your template ID already filled in. You can copy this and add your data payload, or click Invoke to run it directly with an empty payload.To pass runtime data, use the generated curl as a starting point and add your data and profile objects to the --data body:
{
  "data": {
    "user_id": "user_123",
    "user_name": "Jane"
  },
  "profile": {
    "email": "jane@example.com"
  },
  "recipient": "user_123"
}
Invoke tab showing generated curl command
The data and profile objects become the automation’s run context, accessible in every node via refs.data.* and refs.profile.*.In production, call the same endpoint from your application code when a user signs up. The template ID in the curl command is the one you’ll use in your SDK calls. See the Automations API reference for SDK examples.

Extending the Workflow

Once you’re comfortable with the basics, try adding:
  • A schedule trigger instead of API Invoke to run the automation daily for new signups. See Scheduling.
  • A Switch node instead of If to branch on multiple onboarding stages (e.g. “not started”, “in progress”, “completed”). See If / Switch.
  • A Get Profile node to load the user’s full Courier profile before sending, so your templates can reference profile attributes. See Get Profile.
  • Data mapping in send nodes to reshape fetched data into clean template variables. See Dynamic Data.

What’s Next