Website Lead Capture: WhatsApp Notification & Google Sheets Logging - n8n Workflow

Use this powerful n8n workflow to capture website contact form submissions, instantly send alerts via WhatsApp, and automatically log all data into Google Sheets. Perfect for fast lead follow-up.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

Small and medium-sized businesses relying on fast lead follow-up.
Marketing teams needing immediate notification of new website inquiries.
Users looking for pre-built, robust n8n templates for CRM integration.
Developers needing a reliable, self-hosted n8n solution for data piping.

Overview

Missing a website lead, even for an hour, can result in lost revenue. This robust n8n workflow solves the delay issue by providing instant, actionable notifications directly to your team's WhatsApp while simultaneously ensuring the data is securely logged.

This automation is initiated by a custom n8n trigger (a webhook), making it compatible with virtually any web form (e.g., WordPress, custom HTML). The workflow uses a code n8n node to clean the incoming data, standardize formatting, and prepare two distinct outputs—a concise WhatsApp alert and structured data for logging. By leveraging this n8n template, businesses can significantly improve their lead response time and maintain a clean, organized database in Google Sheets, all within one powerful n8n platform.

How it Works

This automation follows a sequential and parallel path, initiated by a crucial n8n trigger:


  1. Incoming Lead (Contact Form Trigger): The n8n workflow starts when the designated Webhook n8n node receives a POST request containing the contact form submission data (Name, Email, Phone, Message, Service).

  2. Data Processing (Format Lead Data): The data passes to a Code n8n node. This node ensures data cleanliness (handling null/empty fields) and constructs a detailed, formatted text message (formattedText) specifically designed for clear reading on WhatsApp. It also adds a real-time timestamp.

  3. Parallel Action 1 (WhatsApp Alert): Using the formatted text generated in the previous step, the WhatsApp n8n node instantly sends a notification to the specified recipient mobile number. This ensures immediate staff awareness of the new lead.

  4. Parallel Action 2 (Log to Database): Simultaneously, the Google Sheets n8n node takes the cleaned, structured data and appends a new row to the designated Lead Database spreadsheet. This action ensures a permanent, organized record of every submission, ready for reporting and follow-up. This complete process runs seamlessly as part of this highly efficient n8n workflow.

Installation Guide

To deploy this comprehensive n8n workflow, follow these steps:


  1. Import the n8n Template: Copy the provided JSON code and paste it into your n8n instance using the 'New' -> 'Import from JSON' function.

  2. Configure the n8n Trigger: In the 'Contact Form Trigger' Webhook n8n node, click 'Test Webhook' to generate the unique URL. Use this URL as the action endpoint for your website's contact form submission.

  3. Set Up Credentials:

Google Sheets: Create an OAuth2 API credential. In the 'Log to Database' n8n node, connect your credential and update the Document ID and Sheet Name to match your lead database spreadsheet. Ensure your sheet has the required columns: date, name, email, phone, service, message.
WhatsApp: Set up your WhatsApp Business API credentials (if not already done). In the 'WhatsApp Alert' n8n node, update the Phone Number ID and the Recipient Phone Number (your staff's mobile number).

  1. Test and Activate: Run the n8n workflow manually with test data to confirm data flow to both WhatsApp and Google Sheets. Once verified, set the workflow to 'Active' to start automated lead management.

Node Details

This n8n workflow utilizes several key n8n nodes to manage the lead capture process:

Contact Form Trigger (Webhook n8n trigger):
Function: Serves as the starting point, listening for incoming lead data from a website form via a POST request.
Key Configuration: Configured to listen on the path /get_data.

Format Lead Data (Code n8n node):
Function: Cleans input data by handling empty or null values and transforms the data structure. It formats a highly readable WhatsApp message and adds a specific Indian timezone timestamp (Asia/Kolkata). This preparation is vital for subsequent actions.
Key Configuration: Contains custom JavaScript logic to extract and format data fields (name, email, phone, message, service).

WhatsApp Alert (WhatsApp n8n node):
Function: Sends the pre-formatted lead alert text directly to a specified mobile number, ensuring instant notification.
Key Configuration: Uses the expression ={{ $json.formattedText }} for the message body. Requires phoneNumberId and recipientPhoneNumber to be configured.

Log to Database (Google Sheets n8n node):
Function: Logs the structured lead information into a Google Sheets spreadsheet, creating a permanent, searchable database.
Key Configuration: Operation set to appendOrUpdate. Columns are mapped directly from the previous n8n node output: date (receivedAt), name, email, phone, message, and service.

Related n8n Workflows

Free

Nodes: 5 Nodes
Updated: December 26 2025
View all
Created by

I love building smart n8n automations that actually work reliably. My focus is on making everyday tasks like email, social media, and CRM workflows simpler using AI. I've shared templates in the n8n community, including a WhatsApp Expense Tracker that people really enjoy. What keeps me excited is constantly trying new things - testing fresh nodes, playing with AI tools like LangChain, and discovering creative ways to connect systems!

Featured*