Module 4 · Hands-on lab
New lead to approved reply
Build a workflow where a fictional web lead triggers an AI draft, you approve it by email, the reply is sent to your own inbox, and failures raise an alert.
About 110 min
What you'll build
A working lead-response workflow: a fictional web lead fills in a form, an AI step drafts a reply using only the listing facts you provide, you approve or decline the draft by email, and only approved replies are sent, to your own inbox. If the AI step fails, the workflow emails you an alert instead of failing silently. It is the intake-and-approval pattern from this module, small enough to finish in one sitting.
Before you start
Allow 90 to 120 minutes. As of October 2026:
| You need | Free option | Notes |
|---|---|---|
| Automation tool | n8n Cloud 14-day trial (Pro features, 1,000 executions, no credit card) | The steps below use n8n. Make's Free plan or Zapier's 14-day trial also work; see the table at the end |
| AI model | n8n's included AI credits on the trial, if offered; otherwise a free Google Gemini API key from Google AI Studio | Google may use free-tier content to improve its products, which is one more reason to use only the fictional data below |
| A Gmail account you own | Every message in this lab goes to you |
Use only the fictional leads below. Put your own email address in each lead's Email field so nothing reaches a stranger. Gmail ignores anything after a plus sign, so [email protected] arrives in your normal inbox and makes each test easy to spot.
LEAD 1 (happy path)
Full name: Jordan Lee
Email: [email protected]
Phone: 416-555-0142
Property: 123 Example Street, Toronto
Message: Hi, is the basement finished? Could we see it Saturday afternoon? We are pre-approved.
LEAD 2 (decline test)
Full name: Sam Patel
Email: [email protected]
Phone: 647-555-0188
Property: 123 Example Street, Toronto
Message: What would you take for it? Can you knock 50K off?
LEAD 3 (error test)
Full name: Morgan Chen
Email: [email protected]
Phone: 905-555-0117
Property: 123 Example Street, Toronto
Message: How many parking spots are there?
Steps
- Start the trial. Go to n8n.io, choose the free trial, and create your workspace. Click Create workflow and name it
Lab 4 - Lead to approved reply. - Add the form trigger. Click Add first step, search for
Form, and choose On form submission. Set the form title toContact Maple & Main Realty (fictional). Add five fields:Full name(Text, required),Email(Email, required),Phone(Text),Property(Text),Message(Textarea, required). - Add a filter. Click the + after the trigger, search
Filter, and add a condition: dragMessagefrom the left panel into the value box and choose is not empty. Rename the nodeCheck message. - Add the AI step. Click +, search
Basic LLM Chain, and add it. Set the prompt source to Define below and paste the prompt below. Replace each{{ }}placeholder by dragging the matching field from the left panel. Rename the nodeDraft reply.
You draft first replies for Maple & Main Realty, Brokerage (a fictional Ontario brokerage).
Use ONLY these listing facts. If the lead asks something not covered, say the listing agent
will confirm. Never give price opinions or negotiate. Canadian spelling. Under 120 words.
Plain text. Sign off: "The Maple & Main Realty team".
LISTING FACTS - 123 Example Street, Toronto (fictional)
- Detached, 3 bedrooms, 2 bathrooms
- Finished basement with recreation room and laundry
- Private drive parks 2 cars
- Showings: Saturday and Sunday 11:00 to 17:00, 24 hours' notice
- Listing agent: Sam Rivera
LEAD
Name: {{ Full name }}
Property: {{ Property }}
Message: {{ Message }}
- Connect a model. Under the chain, click the + on Chat Model. Choose a model node. If the credential list offers n8n's included AI credits, select them. Otherwise choose Google Gemini Chat Model, create a credential, and paste a free API key from Google AI Studio.
- Add the error path. Open
Draft reply, go to Settings, turn on Retry On Fail (2 tries), and set On Error to Continue (using error output). A second, error output appears on the node. - Wire the alert. From the error output, click +, search
Gmail, choose Send a message, and click Sign in with Google to connect your account. Set To to your own address, Subject toLab 4 ALERT: draft failed, and the message to include the lead's name and email, dragged from the left panel. Rename itAlert owner. - Add the approval. From the normal output of
Draft reply, add Gmail, then the operation that sends a message and waits for a response. Set To to your own address and Subject toApprove reply tofollowed by the lead's name. In the message, drag in the lead's message and the draft (thetextfield fromDraft reply). Set the approval type to Approve and Disapprove. Under Options, if you see Limit Wait Time, set 30 minutes. Rename itOwner approval. - Branch on the answer. Add an If node. Run once (step 11) so the approval output appears, then drag the true-or-false field it shows (usually
approved) into the condition and choose is true. - Send or stop. On the true branch add Gmail, Send a message: To is the lead's
Emailfield, Subject isYour inquiry aboutplusProperty, message is the draft text. Rename itSend approved reply. On the false branch add No Operation, do nothing and rename itDeclined or timed out. Click Save. - Test lead 1. Click Execute workflow. A test form opens; fill in lead 1 and submit. Open your inbox, read the approval email, and click Approve. Within a minute the reply arrives at
+lead1. Check that it mentions the finished basement and weekend showings, and nothing that is not in the facts. - Test lead 2. Run again with lead 2. The draft should decline to discuss price. Click Decline. Confirm nothing arrives at
+lead2, then open Executions and find the run that ended atDeclined or timed out. - Test the error path. Open the chat model node, create a second credential named
Broken test keywith the keynot-a-real-key, and select it. Run with lead 3. Confirm the alert email arrives. Switch back to the working credential and save.
Same build in Make or Zapier
| Block | Make (Free plan) | Zapier (14-day trial) |
|---|---|---|
| Trigger | Webhooks, Custom webhook | Webhooks by Zapier, Catch Hook |
| Filter | Filter on the link | Filter by Zapier |
| AI draft | Make's AI module, or Google Gemini with your free key | AI by Zapier |
| Error path | Right-click the AI module, Add error handler, then Gmail | Zap error notifications in settings |
| Approval | Email with links that call a second scenario | Human in the Loop, Request Approval |
| Send | Gmail, Send an email | Gmail, Send Email |
Zapier's Free plan allows only two-step Zaps, so use the trial for this build.
If you're comfortable with code
Replace the form with an n8n Webhook node and send lead 1 from a terminal using its test address:
curl -X POST "YOUR_TEST_WEBHOOK_URL" -H "Content-Type: application/json" \
-d '{"Full name":"Jordan Lee","Email":"[email protected]","Phone":"416-555-0142","Property":"123 Example Street, Toronto","Message":"Is the basement finished?"}'
Then add a duplicate check: a Google Sheets lookup on the email address before the AI step.
What to submit
Paste your workflow's step list (node names in order, including both branches and the error path), the approved reply that reached your inbox for lead 1, the alert email from your error test, and two sentences on the timeout you chose and why.
Check your work
- Nothing reaches a lead's address until you click Approve.
- The lead 1 reply uses only the listing facts and signs off as the brokerage.
- The lead 2 draft does not discuss price, and declining it sends nothing.
- The broken credential produced an alert email, not a silent failure.
- Every email address in the workflow is your own.
If you get stuck
- The approval email never arrives. Check your spam folder, and confirm the Gmail node's To is your address, not the lead's field.
- The If node always goes false. You dragged the wrong field. Open the approval node's output after a test run and use the field that shows
true. - The form test address stops working. Test addresses work only while the editor is listening. Click Execute workflow again before each submission.
- The AI invents details. Make sure the listing facts are in the prompt and the instruction "Use ONLY these listing facts" is first.
- No error output appears. Confirm On Error is set to Continue (using error output) on
Draft reply, not on the chat model.
Template · Markdown
Automation spec and runbook
A spec to fill in before you build an automation and a runbook to keep it alive: steps, data, approvals, consent, errors, logs, schedules, owners and monthly checks.
Submit your lab
Loading your lab status…