Short answer: Publish a 10 minute churn study in Frank, click Deploy to Cloudflare on the Frank Churn Interviews for Stripe repo, paste your keys, add a Stripe webhook endpoint for customer.subscription.deleted and customer.subscription.updated, then put the signing secret on the worker. Cancel a test subscription to check it. It takes about ten minutes if your Frank, Stripe, Cloudflare and email accounts already exist.
Last updated: Nov 28, 2026.
We make Frank AI Researcher, which runs AI-moderated voice interviews with your own customers in 50+ languages. The app on this page is free and MIT licensed.
openssl rand -hex 32.Create one study for customers who cancel. Set the length to 10 minutes and publish it. Copy the interview link, which looks like https://app.hifrank.ai/research/<id>. Under API keys, create a secret key and copy it (Frank shows it once).
Click Deploy to Cloudflare. When it asks, paste:
| Name | Value |
|---|---|
FRANK_INTERVIEW_URL |
The interview link from step 1 |
FRANK_API_KEY |
The Frank secret key |
FOUNDER_NAME |
The name that signs the email |
PRODUCT_NAME |
Your product name |
FROM_EMAIL |
The sending address |
RESEND_API_KEY |
Your Resend key |
OPTOUT_SECRET |
Random secret |
CRON_SECRET |
Random secret |
STRIPE_WEBHOOK_SECRET |
whsec_replace_me for now |
STRIPE_SECRET_KEY |
A Stripe key that can read customers and subscriptions |
Cloudflare gives you a worker URL like https://frank-churn-interviews.<account>.workers.dev.
In the Stripe Dashboard, add an endpoint for https://<your-worker-host>/webhook. Subscribe to customer.subscription.deleted and customer.subscription.updated. Copy the signing secret.
npx wrangler secret put STRIPE_WEBHOOK_SECRET
npx wrangler secret put PUBLIC_BASE_URL
PUBLIC_BASE_URL is the worker origin with no path. It is used for the opt-out link.
Cancel a test subscription in Stripe test mode. The email arrives after the delay, one hour by default. To test locally without waiting:
cp .env.example .env
npm install
npm run dev
stripe listen --forward-to localhost:8787/webhook
stripe trigger customer.subscription.deleted \
--override customer:email=you@example.com \
--override customer:name="Test Customer"
.env.example sets TEST_MODE=true, SEND_DELAY_SECONDS=0 and EMAIL_PROVIDER=log, so the email is printed instead of sent. npm run demo replays a signed webhook twice and shows the second one is ignored.
Change emails/churn.txt and deploy again. Keep it short, signed by a person, with one link.
SEND_DELAY_SECONDS: wait before sending. Default 3600.INVITE_ON_CANCEL_AT_PERIOD_END: set to false to wait for the subscription to actually end.EXCLUDE_EMAILS and EXCLUDE_CUSTOMER_IDS: skip internal and test accounts.EMAIL_PROVIDER=smtp with SMTP_* settings instead of Resend.The n8n churn interview template does a simpler version of the same flow in n8n.
Create the study first at hifrank.ai. Frank’s Free plan includes 225 signup credits plus 60 voice minutes a month, no card required. Works with ChatGPT, Claude, Grok and Muse.
About ten minutes with Frank Churn Interviews for Stripe, if your Frank, Stripe, Cloudflare and email accounts already exist: publish a study, deploy the worker, add the webhook, set the signing secret.
customer.subscription.deleted and customer.subscription.updated. The app uses the update only when cancel_at_period_end changes to true.
Yes. Run it locally with TEST_MODE=true and EMAIL_PROVIDER=log, forward events with stripe listen, and use stripe trigger customer.subscription.deleted. The email is printed to the log.
No for testing. Use a test-mode key. In production, a restricted key that can read Customers and Subscriptions is enough.
Yes. Set EMAIL_PROVIDER=smtp and the SMTP_HOST, SMTP_PORT, SMTP_USER, SMTP_PASS and SMTP_SECURE settings.