A lead that waits an hour is half lost. Most small businesses find out about a website enquiry when someone checks email the next morning. This tutorial fixes that: every form submission reaches n8n, n8n checks it, and a WhatsApp message lands on your phone within a second or two.
You will build a workflow with five working nodes. No code to write; the one Code node is already in the download. We use this exact flow on oopsolutions.com, and it is the first half of workflow 01 in our n8n automation pack, tested on self-hosted n8n 2.14.
What you need
| Item | Where to get it | Cost |
|---|---|---|
| An n8n instance | n8n Cloud, or self-hosted with Docker on a small VPS | n8n Cloud from about €20/month; a VPS from about $5/month (prices change, check before you buy) |
| A Meta developer account with WhatsApp Cloud API | developers.facebook.com | Free to set up. Messages to your own number inside a 24-hour service window are free; check Meta’s current pricing page |
| A website form you control | Any HTML form, Webflow, WordPress, Framer | Already have it |
Total time: about 15 minutes if your n8n is already running.
Step 1: Import the workflow
Download the workflow file: n8n-whatsapp-lead-alert.json.
In n8n: Create workflow → ⋯ (top right) → Import from File. You get this:
Lead Form (Webhook, POST /lead-capture)
→ Clean & Validate (Code)
→ Is Valid? (If)
yes → Remove Helper Fields (Code) → WhatsApp Alert (HTTP Request) → Respond OK
no → Respond Error (400 with the list of problems)
The Webhook accepts both JSON and normal form posts, and it does not care about exact field names: name or fullName, phone or whatsapp, message or details all work. A lead is valid when it has a name and either a valid email or a phone number.
Step 2: Get your WhatsApp Cloud API details
You need three things from Meta: a phone number ID, an access token, and a verified recipient number (your own phone).
- Go to developers.facebook.com → My Apps → Create App → Business. Add the WhatsApp product.
- Open WhatsApp → API Setup. Copy the Phone number ID (a long number under the test phone number).
- Under To, add your own WhatsApp number and confirm the code Meta sends you. Up to five recipient numbers are allowed on the test number.
- Copy the temporary access token. It expires in 24 hours, which is fine for testing. For production, create a System User in Meta Business Settings, give it the WhatsApp permission and generate a token that does not expire.
Keep the token private. It can send messages from your number.
Step 3: Fill in the WhatsApp node
Open the WhatsApp Alert node.
- In the URL, replace
YOUR_PHONE_NUMBER_IDwith the phone number ID from step 2. The URL looks likehttps://graph.facebook.com/v21.0/123456789012345/messages. - In the JSON body, replace
YOUR_WHATSAPP_NUMBERwith your own number, country code first, no plus sign and no spaces. A UK number is447700900123, a Pakistani number is923001234567. - Under Authentication, create a new Header Auth credential. Name:
Authorization. Value:Bearerfollowed by your access token (with the space after Bearer). Select it.
The message body is built by this expression, which you can edit to taste:
'New lead: ' + $json.name + ' | ' + ($json.phone || $json.email) + ' | ' + ($json.message || '').slice(0, 300)
Step 4: Test it
- Click Execute workflow. n8n now listens on the Test URL for about two minutes.
- Send a test lead from a terminal (on Windows, use
curl.exe):
curl -X POST https://YOUR-N8N/webhook-test/lead-capture \
-H "Content-Type: application/json" \
-d '{"name":"Test Lead","email":"test@example.com","phone":"+447700900123","message":"We need a chatbot for bookings"}'
- Your phone buzzes. The terminal shows
{"ok":true,"leadId":"L-..."}.
Send a second test without a name. You get a 400 response with "errors":["name is required"], and no WhatsApp message. That is the validation working.
If nothing arrives: send any WhatsApp message from your phone to the test business number first, then try again. Meta only allows free-text messages inside a 24-hour window after the recipient’s last message. For a permanent setup, create a message template in WhatsApp Manager and switch the body to type: 'template'. The template route works at any time.
Step 5: Publish and connect your form
Click Publish (n8n 2.x) or switch the workflow to Active (n8n 1.x). The Webhook now has a Production URL that ends in /webhook/lead-capture instead of /webhook-test/.
Point your form at it. The simplest version:
<form action="https://YOUR-N8N/webhook/lead-capture" method="POST">
<input name="name" placeholder="Name" required>
<input name="email" type="email" placeholder="Email">
<input name="phone" type="tel" placeholder="WhatsApp number">
<textarea name="message" placeholder="What do you need?"></textarea>
<input type="hidden" name="source" value="website">
<button>Send</button>
</form>
On Webflow, WordPress or Framer, use the form’s “webhook” or “custom action” setting and paste the same URL. If your builder cannot post to a URL, a small fetch() call from the page does the same job.
What it costs per month
| Part | Cost |
|---|---|
| n8n | €0 if you already run it; n8n Cloud from about €20/month; or a $5–7 VPS running n8n in Docker |
| WhatsApp alerts to your own number | Free inside the 24-hour service window. Template messages are priced per message by country; a few hundred alerts a month costs a few dollars at most. Check Meta’s current rate card |
| Your time | 15 minutes once |
For a business that gets ten enquiries a week, the realistic value is not the money saved. It is the two or three leads a month that would have gone cold.
Where to go from here
- Save every lead to a sheet and email it too: that is the full workflow 01 in our n8n automation pack, together with an AI lead qualifier, a daily report and an automatic follow-up.
- Score the lead before it reaches you so a “budget $5k, start next month” message arrives marked hot. That is what the AI lead qualifier does.
- Send the alert to a group or a colleague: duplicate the WhatsApp node and change the
tonumber.
If you would rather have this built, wired to your CRM and monitored, that is a one-hour job for us. Ask for a setup session.
FAQ
Can I use Twilio instead of the Meta Cloud API? Yes. Replace the HTTP Request node with n8n’s Twilio node and send a WhatsApp message from your Twilio sandbox or approved number. Twilio adds a small per-message fee on top of Meta’s price, but the setup is simpler for some teams.
Will this work on n8n Cloud? Yes. The nodes are all built-in (Webhook, Code, If, HTTP Request, Respond to Webhook). Nothing to install.
Does the form visitor see anything different? No. The workflow answers the form within a second with a small JSON reply. Your page shows its normal “thank you” message. If WhatsApp is down, the form still succeeds, because the WhatsApp node is set to continue on error.
Is the visitor’s data safe? The data goes from your site to your n8n and to Meta’s WhatsApp API. Mention both in your privacy policy, as we do in ours.