
Website Lead Management: Send Contact Form Submissions to WhatsApp & Google Sheets
Description
Categories
🤖 AI & Machine Learning
Nodes Used
n8n-nodes-base.coden8n-nodes-base.webhookn8n-nodes-base.whatsAppn8n-nodes-base.stickyNoten8n-nodes-base.googleSheets
PriceFree
Views0
Last Updated11/28/2025
workflow.json
{
"meta": {
"instanceId": "",
"templateCredsSetupCompleted": false
},
"nodes": [
{
"id": "5b107486-adfa-4430-be2d-2df453153abe",
"name": "Contact Form Trigger",
"type": "n8n-nodes-base.webhook",
"position": [
0,
96
],
"webhookId": "",
"parameters": {
"path": "get_data",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 2.1
},
{
"id": "dc65e52c-41f6-4335-8b76-2cfb72406a1b",
"name": "Format Lead Data",
"type": "n8n-nodes-base.code",
"position": [
224,
96
],
"parameters": {
"jsCode": "// Process all incoming webhook items\nconst items = $input.all().map(item => {\n const data = item.json.body || item.json || {};\n\n // Helper function to clean and format values\n const clean = (val) => (val || \"\").toString().trim() || \"N/A\";\n\n const name = clean(data.name);\n const email = clean(data.email);\n const phone = clean(data.phone);\n const service = clean(data.service);\n const message = clean(data.message);\n\n // Add timestamp for context\n const receivedAt = new Date().toLocaleString(\"en-IN\", {\n timeZone: \"Asia/Kolkata\"\n });\n\n // Format the WhatsApp message\n const formattedText =\n `📩 *New Contact Form Submission*\\n` +\n `━━━━━━━━━━━━━━\\n` +\n `👤 *Name:* ${name}\\n` +\n `📧 *Email:* ${email}\\n` +\n `📱 *Phone:* ${phone}\\n` +\n `🛠 *Service:* ${service}\\n` +\n `💬 *Message:* ${message}\\n` +\n `🕒 *Received At:* ${receivedAt}`;\n\n return {\n json: {\n name,\n email,\n phone,\n service,\n message,\n receivedAt,\n formattedText\n }\n };\n});\n\nreturn items;\n"
},
"typeVersion": 2
},
{
"id": "c4bc9fb0-897d-4945-abfa-01d48aa0c593",
"name": "WhatsApp Alert",
"type": "n8n-nodes-base.whatsApp",
"position": [
448,
0
],
"webhookId": "",
"parameters": {
"textBody": "={{ $json.formattedText }}",
"operation": "send",
"phoneNumberId": "YOUR_PHONE_NUMBER_ID",
"additionalFields": {},
"recipientPhoneNumber": "YOUR_MOBILE_NUMBER"
},
"credentials": {
"whatsAppApi": {
"id": "",
"name": "WhatsApp Business API"
}
},
"typeVersion": 1
},
{
"id": "a5f08d80-3448-4f2f-b811-4f2e01c6e2aa",
"name": "Log to Database",
"type": "n8n-nodes-base.googleSheets",
"position": [
448,
192
],
"parameters": {
"columns": {
"value": {
"date": "={{ $json.receivedAt }}",
"name": "={{ $json.name }}",
"email": "={{ $json.email }}",
"phone": "={{ $json.phone }}",
"message": "={{ $json.message }}",
"service": "={{ $json.service }}"
},
"schema": [
{
"id": "date",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "date",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "name",
"type": "string",
"display": true,
"required": false,
"displayName": "name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "email",
"type": "string",
"display": true,
"required": false,
"displayName": "email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "phone",
"type": "string",
"display": true,
"required": false,
"displayName": "phone",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "service",
"type": "string",
"display": true,
"required": false,
"displayName": "service",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "message",
"type": "string",
"display": true,
"required": false,
"displayName": "message",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"date"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "YOUR_SPREADSHEET_ID",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/YOUR_SPREADSHEET_ID/edit",
"cachedResultName": "Lead Database"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"id": "",
"name": "Google Sheets OAuth2 API"
}
},
"typeVersion": 4.7
},
{
"id": "939dac5d-3cd0-4716-8185-f0bfd125e9ea",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-624,
-336
],
"parameters": {
"width": 1392,
"height": 864,
"content": "## 🎯 Website Lead Management: Send Contact Form Submissions to WhatsApp & Google Sheets\n\n### **Purpose:** Convert website inquiries into instant alerts + organized data \n### **Flow:** Website Form → Clean Data → WhatsApp Alert + Google Sheets Log \n### **Result:** Never miss a lead, always have organized records\n\n---\n\n## 📥 CONTACT FORM TRIGGER\n* Receives POST requests from website contact forms\n* Path: */get_data*\n* Copy webhook URL and add to your website form action\n* Triggers whenever someone submits the contact form\n\n## 🔧 FORMAT LEAD DATA\n* Cleans incoming form data (handles empty fields)\n* Formats WhatsApp message with **emojis and structure**\n* Adds *Indian timezone timestamp*\n* Prepares data for both WhatsApp and Google Sheets\n\n## 📱 WHATSAPP ALERT\n* Sends formatted message to your WhatsApp\n* Phone: **YOUR_MOBILE_NUMBER** *(update with your number)*\n* Phone Number ID: **YOUR_PHONE_NUMBER_ID** *(from WhatsApp Business API)*\n* Delivers lead details immediately when form is submitted\n\n## 📊 LOG TO DATABASE\n* Saves all form submissions to Google Sheets\n* Document: **YOUR_SPREADSHEET_ID** *(replace with your sheet ID)*\n* Required columns: date, name, email, phone, service, message\n* Creates permanent record for follow-up and analysis\n\n## 🛠️ SETUP REQUIREMENTS\n* **Google Sheets:** Create sheet with columns: date, name, email, phone, service, message\n* **WhatsApp API:** Business API credentials and phone number ID\n* **Website Form:** POST fields: name, email, phone, service, message"
},
"typeVersion": 1
}
],
"pinData": {},
"connections": {
"Format Lead Data": {
"main": [
[
{
"node": "WhatsApp Alert",
"type": "main",
"index": 0
},
{
"node": "Log to Database",
"type": "main",
"index": 0
}
]
]
},
"Contact Form Trigger": {
"main": [
[
{
"node": "Format Lead Data",
"type": "main",
"index": 0
}
]
]
}
}
}