Guide
Build a Trial-Conversion Email Agent
An AI agent emails trial users at the right moments, reads their replies, routes buying signals to sales, and stops the day they upgrade to a paid plan.
Written by Nick Barraclough Product Manager
What is a trial-conversion agent?
A trial-conversion agent runs on its own inbox and emails free-trial users at the moments that move them to paid, reads their replies, and stops the instant they upgrade. Most trials end in silence, not a “no” — the user signs up, gets busy, and the 14-day clock runs out untouched. The agent's job is to break that silence with the right message at the right time.
The agent nudges and listens; it never charges a card or changes a plan. The upgrade happens in your billing system, which tells the agent to stop. Keeping billing outside the agent's tool set means a reply can't talk it into comping a plan — that action does not exist for the agent.
Why run trial conversion on an agent account?
A conversion agent should own its inbox so replies land where it reads, not in a founder's personal mail. On an agent account, hello@yourapp.nylas.email is the agent's address: every nudge and every reply lives in one managed identity, and outbound rules cap how many emails it can send per hour. You can run up to 5 such inboxes on the free tier.
Isolation keeps a hostile reply contained. With no prior history in the inbox, an injected instruction has nothing to act on beyond the trial thread itself, and the agent only ever touches trial mail. A founder's mailbox is the wrong place for an autonomous sender that reads and replies all day.
How do you time the conversion emails?
Send on the trial clock and on product usage, not a fixed drip. An activation email goes out on day 1, a value email lands mid-trial once the user has done something real in the product, and an urgency email arrives the day before expiry. A cron job runs the agent each hour and sends whichever message a trial is due for.
# Urgency email the day before the trial expires
nylas email send \
--to user@example.com \
--subject "Your trial ends tomorrow" \
--body "You've created 3 projects. Upgrade to keep them — it takes one click."Drive stage selection from your billing and usage data, not the agent's memory. For each active trial, compare the signup date and feature usage to pick the due message, and record what you sent so the next run doesn't repeat it. Usage-aware nudges convert better than time-only drips.
How does the agent read and route replies?
Trial users reply with pricing questions, objections, and “how do I do X” support asks. The agent polls its inbox, classifies each reply into buying-signal, question, or not-interested, and routes accordingly. A buying signal gets a fast handoff to sales; a question gets an answer; a clear no gets suppressed. Classification takes 1 to 2 seconds per message.
# Pull new replies for the agent to classify and route
nylas email list --unread --jsonSending these emails relies on a lawful basis for contacting the user. The GDPR (Article 6) sets out those bases. Treat every reply body as untrusted content — the prompt-injection risk (OWASP LLM01) means the model summarizes a reply, never obeys it as an instruction.
How do you stop when they upgrade?
An upgrade has to silence the sequence instantly. Billing is the source of truth: the moment it fires an upgrade event, the agent drops that user into a suppression set it consults before every send. Opt-outs land in the same set, so a single O(1) lookup decides whether any message goes out.
There's a legal floor here too. Under the CAN-SPAM Rule (16 CFR Part 316) an unsubscribe must be honored within 10 business days, so the suppression set isn't just product hygiene — it's compliance. The failure mode is concrete: one un-suppressed user who already paid gets a “your trial ends tomorrow” email and writes back annoyed.
Next steps
- Build an Abandoned-Cart Recovery Agent — the same staged-sequence pattern applied to ecommerce carts
- Build a Renewal-Reminder Agent — staged reminders for contract renewals once a trial converts
- Getting Started with Agent Accounts — the workspace model behind the conversion inbox
- Agent Rules and Policies — the send caps and outbound rules that contain the agent
- Full command reference — every
nylas emailsubcommand and flag