From Inbox to AgencyZoom
Resend email delivery, Gemini AI enrichment, and a direct AgencyZoom API push. Five prompts. Real CRM integration. No middleware.
EP 01 Made You Capable. EP 02 Makes You Production-Ready.
In EP 01 you built a Form Center: three branded intake forms running locally. Forms submitted, but the data went nowhere. EP 02 is where leads start moving — into your inbox, through an AI enrichment layer, and directly into your AgencyZoom pipeline.
Honest framing: EP 01 was the accessible part. EP 02 introduces real services, real authentication, and real failure modes. You will hit a wall at least once during this build. That is not a bug in the guide. That is the production gap. Domain knowledge starts to matter more here, not less.
Where EP 01 Left Off
- Three forms running locally — general, auto, home
- Validation, scoring, and conditional fields wired up
- A submit handler that doesn't go anywhere yet
Where EP 02 Takes You
- Notification email in your inbox in <5 seconds
- AI-written brief with priority tier and first-touch line
- Real lead in your AgencyZoom pipeline, fully tagged
- No Zapier. No middleware. You own the path.
What You'll Build in EP 02
Five components, layered on top of the EP 01 Form Center. Each one is its own prompt. Run them in order.
1. Resend Email Delivery
A clean lead notification email lands in your agency inbox in seconds. Validated, formatted, agent-facing — every field included.
2. Gemini AI Enrichment
2-3 sentence agent brief, Hot/Warm/Cool priority tier, and a recommended first-touch talking point — attached to the email and staged for AZ.
3. AZ Auth + Discovery
A one-time CLI utility that authenticates with AgencyZoom, fetches your pipelines, stages, and lead sources, and saves your picks to a config file.
4. AZ createLead Integration
The lead is created directly in AgencyZoom using your IDs. Gemini's brief goes into notes. The priority tier becomes a tag. No middleware.
5. Aesthetic Pass
Filmed live, not in this guide: a single prompt that polishes the Form Center to feel like a real product, not a wireframe. Watch the video for that one.
End State
A prospect fills out your auto form. In 5 seconds you have an email, an AI brief saying "Hot — shopping due to rate increase, two vehicles, clean record," and the lead is already in your AZ pipeline with the right stage, source, and tag.
Five Prompts. In Order.
Each prompt builds on the last. By the end, a form fill becomes a real lead in your CRM — with intelligence already attached.
Resend Email
Make it functional.
Wire up the real submission flow. Form posts to your API, server validates, Resend delivers a clean notification to your inbox in under 3 seconds.
Gemini Enrichment
Add intelligence.
Each submission goes to Gemini 2.5 Flash for a structured brief. Priority tier, summary, first-touch line. Attached to the email.
AZ Auth + Discovery
Map the CRM.
Build a CLI that logs into AgencyZoom, fetches your pipelines and stages, and saves your picks to a config the next prompt will read.
createLead Integration
Push the lead.
On submit, after the email and Gemini, the lead is created directly in AZ via /v1/api/leads. AI brief lands in notes. Priority becomes a tag.
Aesthetic Pass
On-camera bonus.
A single polish prompt that turns the Form Center from working software into something you would actually put in front of a prospect.
The EP 02 Prompt Guide
Five prompts, copy-paste ready, with pre-written answers to every question Claude Code will ask. Plus full Resend, Gemini, and AgencyZoom setup walkthroughs and a fix-it section for the failure modes you'll likely hit.
EP 02 Prompt Guide
Available NowThe complete 5-prompt sequence to take your EP 01 Form Center from local-only to production-ready. Every prompt is copy-paste ready. Every likely question from Claude Code has a pre-written answer. Each step has a "how you know it worked" check.
What's included: All 5 prompts. Resend, Gemini, and AgencyZoom setup walkthroughs. The .env.example to .env.local pattern (key hygiene). Auth pathways for SSO vs non-SSO agencies. SSO Addendum with a modified Prompt 3. A "If Something Goes Wrong" section with paste-back fix-it prompts for the most common Resend, Gemini, and AZ failures.
The Production Habits Inside This Build
EP 02 isn't just adding services — it's teaching the patterns that separate weekend projects from production-ready code. These habits stay with you for every build after this one.
.env.example to .env.local Pattern
Claude Code never sees your real keys. It writes .env.example with placeholders — safe to commit. You copy it to .env.local and paste real keys there. Real keys never leave your machine. This is the single most important habit in the guide.
Ask the System, Don't Assume
Every agency configures AgencyZoom differently. Pipeline IDs, stage IDs, lead source IDs — unique to your account. Hardcoding them would break the build for everyone else. The discovery script asks AZ what's actually there. Production code asks. It does not assume.
Enrichment Is Enhancement, Not Blocker
If Gemini fails, the email still sends — with a safe default brief. If AZ push fails, the email still arrives so the lead is captured. Each layer is independent. A failure at one layer never costs you a lead. That is what production resilience looks like.
SSO vs Non-SSO Auth Awareness
If your agency logs into AZ with email + password, the username/password API path works. If you use Google Workspace, Okta, or Microsoft SSO, you need a long-lived API token from AZ support. The guide includes an SSO Addendum with the modified Prompt 3 — same flow, different auth header.
The Full Series
Foundation — The Form Center
AvailableBuild the multi-form lead intake system. Three forms, scoring engine, Resend email delivery. No database yet — pure intake.
From Inbox to AgencyZoom
You Are HereResend email delivery, Gemini AI enrichment with priority tiers, and a direct AgencyZoom API integration. No Zapier. You are here.
Public Website Wrapper
Coming SoonWrap the system in a public-facing agency website. Real domain, real DNS, real Resend domain verification. Live on the internet, ready to take a lead from a stranger who found you on Google.
Common Questions
Do I need to finish EP 01 first?
Yes. EP 02 builds on top of the EP 01 Form Center — three forms, validation, scoring engine. If you don't have that running locally yet, run through EP 01 first. It's a single sitting.
What accounts do I need?
A free Resend account (resend.com), a free Google AI Studio account for the Gemini API (aistudio.google.com), and your AgencyZoom credentials. Resend's free tier is 100 emails/day, plenty for lead intake. Gemini 2.5 Flash on free tier is 15 requests/minute — also plenty.
My agency uses SSO for AgencyZoom — does this still work?
Yes, with one modification. If you sign in with Google, Microsoft, or Okta, the username/password API path won't work. You'll need to contact AgencyZoom support and request a long-lived API token. The guide includes a full SSO Addendum with a modified Prompt 3 — same flow, different auth header.
Will this expose my API keys?
No, if you follow the .env.example pattern. Claude Code only ever writes placeholder files (.env.example) that are safe to commit to Git. Your real keys live in .env.local on your machine and on your production host — nowhere else. The guide walks through this once. Internalize it and you'll never expose a key.
What if Gemini fails or AgencyZoom is down?
Each layer is independent. If Gemini fails, the email still sends with a safe default brief. If AZ push fails, the email still arrives so the lead is captured in your inbox. A failure at one layer never costs you a lead. The guide's fix-it section walks through diagnosing each layer separately.
How long does EP 02 actually take?
If you have all your accounts set up: 1-2 hours. Most of that is reading and verifying, not waiting. The AZ Auth + Discovery prompt is the longest because it's the first time you'll be authenticating against a real third-party API and your config will reflect your specific agency's pipelines and stages.
What does EP 03 add?
EP 03 wraps everything from EP 01 + EP 02 in a real public-facing agency website. Real domain. Real DNS. Real Resend domain verification (so emails don't come from onboarding@resend.dev anymore). Live on the internet, ready to take a lead from a stranger who found you on Google.
Ready to Connect the Pipes?
Download the EP 02 Prompt Guide and run the five prompts in order. By end of session, a prospect can fill out a form and walk into a real lead in your AgencyZoom pipeline — with an AI brief already attached.
Free to download • No credit card required • Real CRM integration
EffiZoom Support
How can we help you today?