Skip to content

Trial lifecycle emails and activation tracking - #200

Merged
danielehrhardt merged 2 commits into
mainfrom
feat/trial-lifecycle-emails
Oct 18, 2026
Merged

danielehrhardt merged 2 commits into
mainfrom
feat/trial-lifecycle-emails

Conversation

@danielehrhardt

@danielehrhardt danielehrhardt commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

Trial users get nothing from us by email today: no license key, no onboarding, no reminder before the first charge (all Stripe customer emails are off). The key only lives on the welcome page, and its "email it to me" button is a mailto: link. The first trial ends 2026-10-24.

What it does

  • Welcome email right after checkout (webhook): license key, download link with the key filled in, three setup steps, the founding setup-call offer, trial end date and cancel link.
  • Day 3: two versions. Key never activated: "Did Godmode install OK?" with the download link again. Activated: three first tasks to try.
  • Trial ending: three days before the trial ends (not sent when the trial is already cancelling): date, price, cancel link, money-back guarantee.
  • At most one email per order per day, each kind once (emails table). An hourly cron (17 * * * *) also sends welcome emails to orders from the last 14 days that never got one, so current trials get their key once this is on.
  • Activation tracking: /api/license records first_seen_at, last_seen_at, app_version when the app checks its key (user agent GodmodeBot/x, at most one write per hour). /admin recent orders get "App" (e.g. 2h ago · v0.2.15 or "not activated") and "Emails" columns.

Off by default

LIFECYCLE_EMAILS = "off" in wrangler.jsonc: due emails are only logged, nothing is sent or recorded. To turn on:

  1. Cloudflare → Email Sending → Onboard Domain usegodmode.com (DNS records), sender daniel@usegodmode.com, replies go to daniel.ehrhardt@codext.de.
  2. pnpm db:migrate (migration 0003), deploy, then set LIFECYCLE_EMAILS to "on" and deploy again.

The worker now has its own entry (src/worker.ts) that serves Astro's handle and adds scheduled.

Tested

  • astro check 0 errors, astro build OK (bundle has scheduled, cron and send_email binding).
  • Local wrangler dev: license check with GodmodeBot/0.2.15 sets activation, a browser user agent doesn't; the cron run logs lifecycle email due (sending is off) welcome … for both test orders and records nothing.
  • Schedule rules checked for fresh trial, day 4, day 12, cancelling trial, converted and non-trial orders.
The four emails (rendered with test data)

1-welcome

Subject: Your Godmode license key

Hi Alondra,

thanks for starting your Godmode trial. Here is everything you need in one place.

Your license key: GM-H9JY8-XXXXX-XXXXX-XXXXX

Download for Mac, Windows or Linux (your key is already filled in):
https://usegodmode.com/download?key=GM-H9JY8-XXXXX-XXXXX-XXXXX

Getting started takes about five minutes:

  1. Install Godmode and open it. Onboarding sets up Claude Code for you.
  2. Sign in with your Claude Pro or Max plan, or paste an Anthropic API key.
  3. Hand over your first task in one sentence, for example "Log into my Amazon account and download all invoices from this year into a folder."

As a founding member you also get a 20-minute setup call with me. Reply with two times that work for you and the three things you want Godmode to take off your plate, and we set them up together.

Your trial runs until October 28. You can cancel any time, right here:
https://usegodmode.com/api/portal?key=GM-H9JY8-XXXXX-XXXXX-XXXXX

If anything gets stuck, just reply. This comes straight to me.

Daniel
Founder, Godmode


2-day3-not-activated

Subject: Did Godmode install OK?

Hi Alondra,

I noticed your Godmode key has not been activated yet, so I wanted to check if something got in the way.

Here is your download again, with the key filled in. Open it on your Mac or PC, not on your phone:
https://usegodmode.com/download?key=GM-H9JY8-XXXXX-XXXXX-XXXXX

Your key, in case you need to paste it: GM-H9JY8-XXXXX-XXXXX-XXXXX

If the install stopped somewhere, reply with a screenshot or one line about where, and I will help you get it running. Or send me two times for the setup call and we do it together in 20 minutes.

Daniel
Founder, Godmode


3-day3-activated

Subject: 3 things to try with Godmode this week

Hi Alondra,

good to see Godmode running on your computer. Three good first tasks, each one message:

  1. "Every weekday at 8, go through my inbox and send me a short list of what needs an answer today."
  2. "Log into my supplier portals and download this month's invoices into one folder."
  3. "Find 20 companies that match my ideal customer, with website and contact, and put them in a spreadsheet."

Anything you do in a browser more than once a week is a good candidate. Ask Godmode to turn it into an agent with a schedule and it keeps doing it for you.

Tell me what you would like to automate first and I will send you the exact message to give it. The setup call is still open too, just reply with two times.

Daniel
Founder, Godmode


4-trial-ending

Subject: Your Godmode trial ends on October 20

Hi,

a quick heads-up: your free trial ends on October 20. After that your card is charged $39/month, the founding price, locked for as long as you stay.

Nothing to do if you want to keep going.

If Godmode is not for you, cancel before October 20 and you will not be charged:
https://usegodmode.com/api/portal?key=GM-H9JY8-XXXXX-XXXXX-XXXXX

And if you stay but it does not pay off, the 14-day money-back guarantee still applies after the first charge.

If something is not working the way you hoped, reply and tell me. I read every answer.

Daniel
Founder, Godmode


Welcome email with the license key right after checkout, a day-3 getting
started email (different when the key was never activated) and a reminder
three days before a trial ends, from an hourly cron. Off until
LIFECYCLE_EMAILS is on. The license API records the app's first/last check
and version, shown in /admin with the emails sent.
@danielehrhardt
danielehrhardt merged commit ec7c8c8 into main Oct 18, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant