Onboarding
App download link SMS: template and code
Move web signups onto your mobile app with a text, then an email, and skip anyone who already installed.
Passing, tested 2026-10-19 · SMS, Email
How it works
When to send an app download link
An app download link SMS gets web signups onto your mobile app. Two days after signup it texts a link to your app, and on day 5 it emails App Store and Google Play buttons. People without a phone number get only the email, and installing the app stops the rest.
- Web signupYour app starts the journey
- Day 2SMS with the download linkSkipped if there's no phone number. Canceled once the app is installed
- Day 5Email with App Store and Google Play buttonsCanceled once the app is installed
Stops early: When the app is installed, cancel the run and every step still to come is dropped. Cancel it the same way when the account is deleted.
The waits are Courier delay nodes. We test this exact journey with each wait shortened to seconds.
Messages
What each step sends
Step 1: 2 days after signup
SMS with the download link. Skipped if there's no phone number. Canceled once the app is installed.
SMS
Acme: get our app for iPhone and Android here: https://acme.app/get Reply STOP to opt out.
Step 2: 5 days after signup
Email with App Store and Google Play buttons. Canceled once the app is installed.
Hi Dana,
Acme also comes as a mobile app. Download it and sign in with the account you already have.
Other subject lines: "Get Acme on your phone"
Want different timing? Change the 2-day and 3-day waits in the Journeys editor. The second wait counts from the first, so the email goes 3 days after the text.
Build
Add it to your app
1. Create the journey
Run setup.ts once with your API key. It creates the templates and the journey, publishes it, and prints the journey ID you pass to step 2. Copy setup.ts, journey.json, and the templates folder from the full definition at the end of this section.
Terminal
COURIER_API_KEY=pk_... node --experimental-strip-types setup.ts
2. Start it when someone signs up
Node.js
// Start the sequence when someone signs up on the web, with the journey ID setup.ts printed.// The templates read the first name from the user's Courier profile, so// there's no data to pass.import Courier from "@trycourier/courier";const client = new Courier();export async function startAppDownloadLinks(journeyId: string, userId: string) {const { runId } = await client.journeys.invoke(journeyId, {user_id: userId,});return runId;}
Python
# Start the sequence when someone signs up on the web, with the journey ID setup.ts printed.# The templates read the first name from the user's Courier profile, so# there's no data to pass.from courier import Courierclient = Courier()def start_app_download_links(journey_id: str, user_id: str) -> str:response = client.journeys.invoke(template_id=journey_id, user_id=user_id)return response.run_id
3. Stop it when they install the app
Node.js
// Stop the sequence when the app is installed, or when the account is deleted.// It cancels every run waiting for the user, and does nothing if the sequence// already finished.import Courier from "@trycourier/courier";const client = new Courier();export async function stopAppDownloadLinks(userId: string) {await client.journeys.cancel({ cancelation_token: `app-${userId}` });}
Python
# Stop the sequence when the app is installed, or when the account is deleted.# It cancels every run waiting for the user, and does nothing if the sequence# already finished.from courier import Courierclient = Courier()def stop_app_download_links(user_id: str) -> None:client.journeys.cancel(cancelation_token=f"app-{user_id}")
Full definition: journey.json, setup.ts, and the 2 templates
The SMS goes on day 2 to anyone with a phone number, and the email goes on day 5 to everyone.
When someone signs in on mobile, your app cancels the run and nothing else goes out.
journey.json
{"name": "App download link","cancelation_token": "app-{{recipient}}","nodes": [{"type": "trigger","trigger_type": "api-invoke"},{"type": "delay","mode": "duration","duration": "P2D"},{"type": "send","channel": "sms","message": {"template": "@app-link-sms"},"conditions": ["profile.phone_number", "exists"]},{"type": "delay","mode": "duration","duration": "P3D"},{"type": "send","channel": "email","message": {"template": "@app-link-email"}},{"type": "exit"}]}
setup.ts
// Creates this recipe's journey from journey.json and the templates/ folder,// then publishes it. Run it once per workspace://// COURIER_API_KEY=pk_... node --experimental-strip-types setup.ts//// It prints the journey ID and the template IDs it created.import Courier from "@trycourier/courier";import { readFileSync, readdirSync } from "node:fs";const client = new Courier();const here = new URL(".", import.meta.url);const readJson = (path: string) =>JSON.parse(readFileSync(new URL(path, here), "utf8"));const spec = readJson("journey.json");// 1. Create the journey, then the templates its send nodes use.const journey = await client.journeys.create({name: spec.name,nodes: [spec.nodes[0], spec.nodes.at(-1)],});const templateIds: Record<string, string> = {};for (const file of readdirSync(new URL("templates/", here))) {const key = file.replace(/\.json$/, "");const template = await client.journeys.templates.create(journey.id,readJson(`templates/${file}`));await client.journeys.templates.publish(template.id, {templateId: journey.id,});templateIds[key] = template.id;}// 2. Save the nodes. In journey.json, "@<template>" stands for the ID of the// template with that file name. Node IDs must be unique across a workspace,// so any node ID journey.json names (used by "send_status.<id>" conditions)// gets this journey's ID added.const nodeIds = [...JSON.stringify(spec.nodes).matchAll(/"id":"([\w-]+)"/g),].map((m) => m[1]);let nodes = JSON.stringify(spec.nodes).replace(/"@([\w-]+)"/g, (_, key) =>JSON.stringify(templateIds[key]));for (const id of nodeIds)nodes = nodes.replace(new RegExp(`(?<=[".])${id}(?=")`, "g"),`${id}-${journey.id}`);await client.journeys.replace(journey.id, {name: spec.name,cancelation_token: spec.cancelation_token,nodes: JSON.parse(nodes),});// 3. Publish, so new runs use this version.await client.journeys.publish(journey.id);console.log(JSON.stringify({ journeyId: journey.id, templateIds }));
templates/app-link-sms.json
{"channel": "sms","notification": {"name": "App download link (SMS)","tags": ["recipe", "app-download-link-sms"],"brand": null,"subscription": null,"content": {"version": "2022-01-01","elements": [{"type": "channel","channel": "sms","elements": [{"type": "text","content": "Acme: get our app for iPhone and Android here: https://acme.app/get Reply STOP to opt out."}]}]}}}
templates/app-link-email.json
{"channel": "email","notification": {"name": "App download link (email)","tags": ["recipe", "app-download-link-sms"],"brand": null,"subscription": null,"content": {"version": "2022-01-01","elements": [{"type": "channel","channel": "email","elements": [{"type": "meta","title": "Get the Acme app"},{"type": "text","content": "Hi {{default profile.first_name \"there\"}},"},{"type": "text","content": "Acme also comes as a mobile app. Download it and sign in with the account you already have."},{"type": "action","content": "Download on the App Store","href": "https://apps.apple.com/app/acme/id1234567890"},{"type": "action","content": "Get it on Google Play","href": "https://play.google.com/store/apps/details?id=com.acme.app"}]}]}}}
Agents
Hand it to your agent
Give this prompt to Claude Code, Cursor, or Codex with the Courier skill installed. Agents can also read the markdown version and the manifest.
Data
Data fields
| Field | Type | Example | Note |
|---|---|---|---|
| profile.first_name | string | Dana | From the profile. Write it when the user signs up. The emails say "there" when it's missing |
FAQ
Frequently asked questions
When should I send an app download link after signup?
Give the web product a couple of days first, then text. This recipe texts on day 2 and emails on day 5, and you can change either wait in the Journeys editor.
How do I skip people who already installed the app?
When the app first signs in, cancel the run with the token app-<user_id>. Nothing is stored on the profile, and the SMS and email still to come are dropped.
What happens if the user has no phone number?
The SMS is skipped and the email still goes. The SMS step checks the profile for a phone number first.
Can one link work for both iPhone and Android?
Yes. Use a link from your deep link or attribution provider that routes by device as the SMS link. The email has a separate button for each store.
Recipes
Related recipes
Welcome every new user, then nudge only the ones who haven't finished setup.
Point each stuck user at their next unfinished setup step, not a generic nudge.
Send a login code by SMS, fall back to email, and stop retrying once the code is stale.
Docs
How each part works
Build this in your workspace
Run setup.ts against a free account and the journey is live in a minute. Prefer no code? Rebuild it in the Journeys editor.