Never lose another inbound lead. The exact AI workflow that qualifies every new lead, responds in seconds, and books more meetings automatically. No coding or automation tools (Zapier, n8n) required — it plugs into the tools you already use.
Leads that get a response within 5 minutes are 10x more likely to close than those contacted an hour later. This toolkit closes that response gap for you, automatically.
You just downloaded the whole thing. Set it up once (about 20 minutes), point your signup form or ad at it, and every new lead gets an instant, personalized reply while you get a qualified, scored record in your inbox and a spreadsheet. Running costs are low: Google and hosting can start free, and the AI is usage-based (typically a few cents per lead, less if you use a smaller model).
The moment someone submits your form, four things happen at once:
- Qualifies the lead — Claude scores it on fit and intent, tiers it
hot / warm / cold / spam, and recommends how fast to follow up. - Responds instantly — emails the lead back with a personalized, on-brand message (no more "sorry for the late reply").
- Logs it — appends a row to a Google Sheet so you have a running record.
- Alerts you — sends you an internal note tagged by tier, so you chase the hot ones first.
Visitor ──▶ your form ──POST /lead──▶ Express
│
├─▶ Claude (qualify + route)
├─▶ Gmail (instant reply to the lead)
├─▶ Google Sheets (log the lead)
└─▶ Gmail (alert you, tagged by tier)
It ships with a clean, hosted signup page (public/index.html) that collects just name, email, and company, so you don't even need a separate form tool. The whole thing runs as one small app.
Founders, marketers, and small sales teams who get inbound leads from a form, an ad, or a link and want them handled instantly without paying for a heavy CRM or marketing suite. If you can copy and paste API keys, you can run this.
- An Anthropic API key — powers the AI qualification. This is paid, usage-based: you're billed per lead the AI reads (a small amount of text each time), so cost scales with volume. Expect roughly a few cents per lead on the default model, and much less if you point
CLAUDE_MODELat a cheaper one likeclaude-haiku-4-5. New accounts may include some trial credit. - A Google account — free. Gmail sends the emails, Google Sheets stores the leads.
- Node.js 20+ — free, to run it locally. Plus a host to put it online: Replit is the easy path (free to build; deployments have a small usage cost), but any Node host works.
npm install
cp .env.example .env # then fill it in as you go through the steps belowA one-time browser sign-in. No Workspace or admin account needed — a normal Gmail works.
- In Google Cloud Console, create (or pick) a project and enable the Google Sheets API and Gmail API (APIs & Services → Library).
- Open the OAuth consent screen, set User Type to External, then Publish the app (Publishing status → Publish app). Publishing keeps your login from expiring after 7 days. You'll click through an "unverified app" notice, which is normal for your own app.
- Create an OAuth client ID (Credentials → Create credentials → OAuth client ID), application type Desktop app. Download the JSON and save it as
oauth-client.jsonin this folder. - Run the sign-in. It opens your browser, you approve, and a
token.jsonis saved automatically:npm run auth:google
- Set
GMAIL_SENDERin.envto that same Gmail address (it's the "from" on your emails). - Create a Google Sheet (signed in as that account). Rename the tab to
Leadsand paste this into row 1:Copy the Sheet ID from its URL (Timestamp Name Email Company Phone Message Score Tier Routing Reasoning Extradocs.google.com/spreadsheets/d/THIS_PART/edit) intoLEADS_SHEET_ID.
Set ANTHROPIC_API_KEY in .env. The model defaults to claude-opus-4-8, which gives the sharpest qualification. If you expect high volume and want to keep costs down, set CLAUDE_MODEL=claude-haiku-4-5 — it's a fraction of the cost and still handles lead scoring well.
GITHUB_REPO_URL— the link every lead receives (point it wherever your offer lives).REPLY_FROM_NAME— the name your emails are signed with.COMPANY_NAME/COMPANY_DESCRIPTION— a line about what you sell and who your ideal customer is. This tunes the AI's scoring to your business.
npm run dev # serves http://localhost:3000Open http://localhost:3000 to see your form. To send a test lead through the whole pipeline (use your own email so the reply comes to you):
npm run test:lead you@email.comWant to test just the AI scoring without touching Google? npm run test:qualify.
The form and the automation run as one Replit deployment.
- Import this repo into Replit (Create → Import from GitHub).
- Open the Secrets tab and add your settings. Since
oauth-client.jsonandtoken.jsonstay on your machine (they're never committed), paste their contents as secrets instead:GOOGLE_OAUTH_CLIENT_JSON= the full contents ofoauth-client.jsonGOOGLE_TOKEN_JSON= the full contents oftoken.json- plus
ANTHROPIC_API_KEY,GITHUB_REPO_URL,LEADS_SHEET_ID,GMAIL_SENDER,REPLY_FROM_NAME,TEAM_NOTIFY_TO,COMPANY_NAME,COMPANY_DESCRIPTION
- Click Deploy → Autoscale. Replit builds and starts it, then hands you a public HTTPS URL.
- That URL is your landing page. Point your ad, post, or link straight at it.
The included .replit file already sets the build and run commands, so the deploy just works.
Node.js + TypeScript, one small Express app that serves the form and the API.
| Path | What it does |
|---|---|
| public/index.html | The hosted signup form |
| src/index.ts | Web server: serves the form + handles POST /lead |
| src/pipeline.ts | Runs qualify → reply → log → alert |
| src/services/claude.ts | AI qualification + routing |
| src/services/sheets.ts | Appends the lead row |
| src/services/gmail.ts | Sends the emails |
| src/lib/google-auth.ts | Google sign-in |
| src/config.ts | Loads and checks your settings |
- Spam protection: the public form uses a hidden honeypot field plus rate limiting (5 submissions/minute per IP) to keep bots out.
- Nothing blocks: the reply, the log, and the alert run in parallel. If one hiccups, the others still go through, and the error is logged.
- Email volume: a free Gmail account sends about 500 emails/day and can flag high-volume identical mail as spam. That's plenty to start. If you scale up, swap the sender in src/services/gmail.ts to a service like Resend or SendGrid.
- Your keys stay yours:
.env,token.json, andoauth-client.jsonare never committed to git.
MIT — use it, change it, ship it.