How it works
- Point your website contact form (or new-lead emails from your intake tool or legal directories) at the n8n webhook URL.
- The workflow reads the lead's name, phone, email and short description.
- AI writes a reply that names the type of matter, offers your consultation booking link and gives no legal advice.
- It's sent as a text and an email within a minute, and you get an alert so a person can call back.
Tools used
How we got this number
- Twilio local number$1.15
- Texting registration (A2P 10DLC) monthly fee$2
- ~100 text segments sent + received$0.83
- carrier fees on ~50 outbound texts$0.25
- ~50 AI-written replies$0.02
- Automation platform (or self-host n8n free)โฌ20
- Calendly free booking link (one event type)$0
Assumes ~50 form leads a month. Uses the same Twilio number as the missed-call recipe. Any booking link works; Calendly's free plan covers one consultation type. Prices are list prices checked 2026-10-26; see every source.
Plus one-time texting registration (A2P 10DLC): about $19.50 (low-volume brand + campaign vetting). Source
The full setup, step by step
9 steps in one n8n workflow. Everything below is generated from the template itself, so it always matches.
Before you start
You need an n8n account (n8n, or self-host it free) plus your own logins for: OpenAI API Twilio Gmail / Google Workspace.
How the automation flows
When a web lead comes in
Tap a step to jump to its details.
Each step and what it does
- 1Trigger
New lead from your form
Your website form (or any lead source that can send a webhook) posts the lead's name, phone, email and message here.
Webhook path
YOUR_N8N_URL/webhook/new-leadThen โ 2. Config (edit me)
- 2Settings
Config (edit me)
One place for everything specific to your business. Every later step reads from here, so this is the only node you have to edit.
Then โ 3. Tell the form it worked
- 3Reply to request
Tell the form it worked
Answers the website form instantly so the visitor sees a success message.
Then โ 4. AI writes reply
- 4AI (OpenAI)
AI writes reply
OpenAI drafts a short, on-brand reply using your business info and the customer's message. The instructions (prompt) keep it short and stop it from inventing prices.
Model
gpt-5-miniAI instructions (prompt)
You are the friendly intake coordinator at a small law firm. Write one short, warm SMS reply (under 300 characters) to a person asking about legal help. Thank them, confirm an attorney or intake team member will call them back during office hours, and offer the consultation booking link. Never give legal advice, never predict an outcome, never say the firm will take the case, and never quote fees. Ask them not to send case details or documents by text. If they say someone is in custody, a court date is today or tomorrow, or they are in danger, tell them to call the office directly and, if they are in danger, to call 911. Sign off with the firm name.
๐ Connect your OpenAI login on this node
Then โ 5. Has a phone number? ยท Then โ 7. Has an email? ยท Then โ 9. Email the owner
- 5Decision
Has a phone number?
Only texts the lead if they gave a phone number.
Rulelead's phone is filled in
If yes โ 6. Text the lead ยท If no โ stops here
- 6Send SMS (Twilio)
Text the lead
Texts the AI's reply to the lead, usually within a minute of them hitting submit.
Sendsthe message shown under Message copy
๐ Connect your Twilio login on this node
End of this path.
- 7Decision
Has an email?
Only emails the lead if they gave an email address.
Rulelead's email is filled in
If yes โ 8. Email the lead ยท If no โ stops here
- 8Send email (Gmail)
Email the lead
Emails the same reply, so they have it in writing.
Sendsthe message shown under Message copy
๐ Connect your Gmail login on this node
End of this path.
- 9Send email (Gmail)
Email the owner
Emails you so you know who to call back (and what they were told).
Sendsthe message shown under Message copy
๐ Connect your Gmail login on this node
End of this path.
Key settings to change
All of these live in the Config (edit me) node. Change them once and every text and email updates.
| Setting | Placeholder in the template | Change it to |
|---|---|---|
Business namebusiness_name | YOUR BUSINESS NAME | Exactly how customers know you. It appears in every text. |
Booking / calendar linkbooking_link | https://YOUR-BOOKING-LINK | Your online booking page (Calendly, your CRM's scheduler, or your contact page). Use the short public link. |
Hourshours | Mon-Fri 8am-6pm | Short and text-friendly, e.g. Mon-Fri 8am-6pm. |
Your emailowner_email | you@example.com | Where the 'new lead' and 'missed call' alerts go. |
Your cellowner_cell | +15555550100 | In +1 format (+15551234567). |
Twilio numbertwilio_number | +15555550199 | The number you bought in Twilio, in +1 format. Texts are sent from it. |
Leave lead_name, lead_phone, lead_email, lead_message as they are: they map your form's name, phone, email and message fields.
Message copy: exactly what it sends
Highlighted parts are filled in automatically. Edit the wording right in the node.
Subject Thanks for reaching out to business name
Subject New lead: lead's name
Phone: lead's phone
Email: lead's email
Message: lead's message
We already replied with: AI-written reply
Hook it up
- Fill in Config (edit me).
- Connect your own Twilio, OpenAI and Gmail credentials on the red nodes.
- Point your website form to POST to
YOUR_N8N_URL/webhook/new-leadwith fieldsname,phone,email,message(or forward lead emails with a Gmail filter + an Email Trigger node). - Register your Twilio number for A2P 10DLC.
- Send yourself a test lead, then activate.
Test it before you trust it
Skip the clicking
Get the ready-to-import n8n template
Every step above, already wired up. Paste it into n8n, add your logins, fill in your business info and you're live.
โ Unlocked. Here's your template.
- In n8n: click New workflow.
- Paste onto the empty canvas (Ctrl/Cmd+V).
- Set your credentials on the red nodes, then fill in Config (edit me).
Download .json instead ยท Using Make instead of n8n? A Make version of this template is coming soon.