---
ref: workflow:free-to-paid-activation
title: Guide active free users toward their first paid moment
author: thedogwiththedataonit
tools: [tool:posthog/run-sql-query, tool:stripe/list-customers, tool:stripe/list-subscriptions, tool:brew/generate-email, tool:brew/send-email]
tags: [capability:send-email, capability:track-product-usage, capability:track-revenue, capability:write-copy, channel:email, has:api, has:cli, has:mcp, motion:plg]
updated: 2026-09-27
---

# Guide active free users toward their first paid moment

Set up the tools below, then run the steps in order for the user.

## Inputs

Ask the user for these before you start.

- `activation_event`: the event that marks real usage, e.g. campaign_sent
- `trial_plan`: the plan to offer, e.g. Pro, 14-day trial

## Set up

### Run a SQL query (PostHog, tool:posthog/run-sql-query)

Use the first option your agent supports.

#### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "posthog": { "url": "https://mcp.posthog.com/mcp" } } }
```

Call the MCP tool `execute-sql`.

#### CLI (official)

Install the command, then confirm it runs.

```sh
npm install -g @posthog/cli@latest
posthog-cli --version
```

Run `posthog-cli api call execute-sql`.

Set `$POSTHOG_CLI_API_KEY` in your environment first (get a key: https://app.posthog.com/settings/user-api-keys?preset=mcp_server).

### Stripe (tool:stripe/list-customers, tool:stripe/list-subscriptions)

Use the first option your agent supports.

#### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "stripe": { "url": "https://mcp.stripe.com" } } }
```

- List customers: call the MCP tool `stripe_api_read`
- List subscriptions: call the MCP tool `stripe_api_read`

#### CLI (official)

Install the command, then confirm it runs.

```sh
npm install -g @stripe/cli
stripe --version
```

- List customers: run `stripe customers list`
- List subscriptions: run `stripe subscriptions list`

### Brew (tool:brew/generate-email, tool:brew/send-email)

Use the first option your agent supports.

#### MCP (official, remote)

Add this server to your agent's MCP settings, then sign in when asked.

```json
{ "mcpServers": { "brew": { "url": "https://brew.new/api/mcp" } } }
```

- Generate an email: call the MCP tool `create_email`
- Send an email: call the MCP tool `send_email`

#### CLI (official)

Install the command, then confirm it runs.

```sh
brew install getbrew/tap/brew-cli
brew-cli --version
```

- Generate an email: run `brew-cli emails generate`
- Send an email: run `brew-cli emails send`

Set `$BREW_API_KEY` in your environment first (get a key: https://brew.new/settings/api).

Make one read-only call to each tool to confirm access.

## Steps

1. **Find activated free users** with Run a SQL query (PostHog). List users on the free plan who fired `activation_event` three or more times in the last 14 days.
2. **Find their customers** with List customers (Stripe). Look up each user's email, as stored and lowercased, and keep every customer ID it returns.
3. **Skip paying customers** with List subscriptions (Stripe). Remove anyone whose customer has an active subscription.
4. **Write the email** with Generate an email (Brew). Draft one email explaining `trial_plan` around what they already did. Show it to the user.
5. **Send** with Send an email (Brew). After the user approves, send it to the remaining users.

## Done when

- No paying customer received the email.
- The user has the count of users emailed.

## Rules

- Only use the tools listed above.
- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
