{
  "slug": "welcome-email-sequence",
  "title": "Welcome email sequence: template and code",
  "url": "https://www.courier.com/recipes/welcome-email-sequence",
  "markdown": "https://www.courier.com/recipes/welcome-email-sequence.md",
  "stage": "Onboarding",
  "purpose": "Welcome every new user, then nudge only the ones who haven't finished setup.",
  "summary": "A welcome email sequence greets new users and helps them finish setup. It sends a welcome email at signup, a setup nudge the next day by email and Inbox to anyone who hasn't finished, and a tips email on day 3. Finishing setup skips the nudge, and you can cancel the rest anytime.",
  "channels": [
    "email",
    "inbox"
  ],
  "shape": "journey",
  "shows": [
    "A condition on a profile field your app sets",
    "An Inbox copy when the first email wasn't opened",
    "Names read from the profile, so there's no data to pass"
  ],
  "data": [
    {
      "name": "profile.first_name",
      "type": "string",
      "example": "Dana",
      "note": "From the profile. Write it when the user signs up. The emails say \"there\" when it's missing"
    },
    {
      "name": "profile.setup_completed_at",
      "type": "ISO 8601 datetime",
      "example": "2026-10-21T18:30:00Z",
      "note": "From the profile. Your app sets it when setup is done"
    }
  ],
  "steps": [
    {
      "step": "1",
      "when": "Right after signup",
      "channels": "Email",
      "templates": [
        "templates/welcome-email.json"
      ]
    },
    {
      "step": "2",
      "when": "1 day after signup",
      "channels": "Email, Inbox",
      "templates": [
        "templates/setup-nudge-email.json",
        "templates/welcome-inbox.json"
      ]
    },
    {
      "step": "3",
      "when": "3 days after signup",
      "channels": "Email",
      "templates": [
        "templates/tips-email.json"
      ]
    }
  ],
  "files": {
    "journey": "journey.json",
    "templates": [
      "templates/welcome-email.json",
      "templates/setup-nudge-email.json",
      "templates/welcome-inbox.json",
      "templates/tips-email.json"
    ],
    "setup": [
      "setup.ts"
    ],
    "start": [
      "start.ts",
      "start.py"
    ],
    "stop": [
      "stop.ts",
      "stop.py"
    ]
  },
  "docs": [
    "https://www.courier.com/docs/guides/build-an-onboarding-sequence",
    "https://www.courier.com/docs/journeys/nodes/delay",
    "https://www.courier.com/docs/journeys/nodes/send",
    "https://www.courier.com/docs/journeys/nodes/cancel",
    "https://www.courier.com/docs/journeys/invoke"
  ],
  "related_recipes": [
    "https://www.courier.com/recipes/onboarding-incomplete-reminder-email",
    "https://www.courier.com/recipes/feature-adoption-email-sequence",
    "https://www.courier.com/recipes/email-verification-reminder-email"
  ],
  "agent_prompt": "Add a welcome email sequence to this app, sent through Courier: a welcome email at signup, a setup nudge the next day for people who haven't finished, and tips on day 3. Follow the steps at https://www.courier.com/recipes/welcome-email-sequence.md and use the Courier skill for SDK details.\n\n1. Create the journey and its templates in my Courier workspace by replacing Acme, the setup link, and the tips in the template files with our own, then running setup.ts from that page with COURIER_API_KEY from our environment. Save the journey ID it prints as COURIER_WELCOME_JOURNEY_ID.\n2. Find where this codebase creates a new user and start the journey there. Pass only the user ID, and write first_name and email to the user's Courier profile at signup.\n3. Find where a user finishes setup and set setup_completed_at on their Courier profile. Cancel the journey with the token welcome-<user_id> when an account is deleted.\n4. Match this codebase's language, file layout, and error handling. Never hardcode the API key.\n5. When you're done, start one run for a test user and show me the run's steps.",
  "status": {
    "state": "passing",
    "last_tested": "2026-10-19"
  }
}
