Give each customer a referral link and thank them the moment someone they sent signs up
Published 2026-11-24
A referral program gives each customer a personal link, credits them for every signup it brings in, and thanks them while it still feels good. The idea is easy. Keeping the credit straight for months without anyone tending it is the hard part.
ChatGPT covers a fair amount of this today. ChatGPT Sites can host a signup page on your custom domain, read a referral code from the link, and save each signup in its database. A linked cloud schedule can read that table every month, and with Gmail or Outlook connected ChatGPT can send a thank-you from your account. For a few referrals a year, that may be enough.
The gap that remains
Sites has no background job, so a new signup sends nothing on its own, and the thank-you waits for the next scheduled run, which wakes a model to decide what to write. A send through your connected inbox may pause for your approval and goes out from your personal address. If a referral should only count once the new customer pays, checking your payment tool needs an API key, and a task has no secrets store to keep it in. Nothing records which thank-yous and credits already went out, so a rerun can count someone twice.
What your assistant builds with Sails
Sails is a coding agent you connect over MCP, with cloud deployment built in. Your assistant writes the code and Sails runs it in the cloud. For referrals it builds four pieces.
A customers table with name, email, and a short referral code, and a referrals table with the referrer, the new person, the signup time, a paid flag, and when each email went out.
A short link on your domain, such as /r/CODE, that leads to your signup form, which saves each new person with the code attached.
An on-submit job, ordinary shell code with no model in the loop, that thanks the referrer from a mailbox your assistant owns the moment the signup lands.
A nightly job that checks your payment tool with a key kept in the Sails secrets store and marks paid referrals. On the first of the month it emails each customer their tally and credit, and records every send.
Why it works
The codes, signups, payments, and send record live in the same tables, so the credit each customer sees matches what you owe. The jobs run on time whether or not anyone opens a chat, and replies come back to an inbox your assistant can read.
Hand it off
Copy this into your assistant:
Add Sails from https://sails.app/start. I want a referral program for my customers. Keep a customers table with name, email, and a short referral code, and a referrals table with referrer, new person, signup time, paid flag, and send times. Host a /r/CODE link on my domain that leads to a signup form and saves the code with each signup. When a signup lands, run a plain shell job with no model involved that thanks the referrer from a Sails inbox. Each night, check my payment tool with a key stored in Sails secrets and mark paid referrals. On the first of each month, email each customer their tally and credit, and record every send so a rerun skips anyone already mailed. Ask me anything you need before you start.