Skip to content

WhatsApp to Google Sheets: log every lead automatically

Log every new WhatsApp chat in Google Sheets automatically with n8n or Power Automate: the columns to keep, one row per lead, and how to stop duplicates.

Written by
By WavesFlo team
Last updated
Updated
Reading time
8 min read

WhatsApp can't write to a spreadsheet, so each incoming message has to start a workflow that adds a row: time, sender, the number it reached, the message and the lead's source. Build it in n8n with the Google Sheets node, or in Power Automate with an HTTP-triggered flow, and use the event ID to keep retried deliveries from counting twice.

Below: the columns worth keeping, an n8n workflow step by step, a lead list with one row per person, and the Power Automate alternative. The examples use WavesFlo, which links the WhatsApp numbers your team already uses by QR code and sends a signed message.received webhook for every incoming message.

What can you send from WhatsApp to Google Sheets?

Everything an incoming message carries. WavesFlo's message.received event includes an event ID that stays the same on every retry, a timestamp, the chat and its kind, such as direct chat or group, the sender and the name on their WhatsApp profile, the message type and text, and the id of the connected number it arrived on. For a lead log, keep these columns:

Columns for a WhatsApp lead log in Google Sheets
ColumnComes fromWhy keep it
Event IDThe event's identifier, unchanged across retriesA retried delivery carries the same ID, so it isn't counted twice
TimeThe event's own timestamp, converted to ISTEvents can arrive out of order, so sort by this, not by row
FromThe sender's numberThe value you will match against a CRM later
NameThe name on the sender's WhatsApp profileA label the customer chose, not a verified name
Arrived onThe id of your number the message reachedShows which team's number the lead wrote to
Chat typeDirect chat or groupKeeps group chatter out of the lead list
MessageThe text, or the type for a photo, voice note or documentThe enquiry itself
SourceWorked out from the first message's wordingWhich link, QR code or listing brought the lead
The event carries your number's id, not a friendly name, so keep a small Numbers tab mapping each id to its phone number and team, and look it up with VLOOKUP. The sheet holds personal data: share it with the people who work the leads, never as Anyone with the link.

How do you connect WhatsApp to Google Sheets with n8n?

  1. In Google Sheets, create a tab called Messages with the column names above, all but Source, in row 1. n8n treats the first row as headings.
  2. In n8n, start a workflow with a Webhook node, and in WavesFlo add its URL as a webhook destination subscribed to the Messaging category. Verify each delivery's signature first, as the webhooks guide shows, because an unchecked webhook URL lets anyone who finds it write rows, then continue only for message.received.
  3. Add an If node that passes only direct chats. If you want groups logged too, route them to a tab of their own.
  4. Add an Edit Fields (Set) node that maps the event to your column names, converts the timestamp to IST, and writes the message type, such as image or document, when there is no text.
  5. Add a Google Sheets node: Sheet Within Document, Append or Update Row, your spreadsheet and the Messages tab, Map Each Column Manually, matching on Event ID. A retried delivery then updates its own row instead of adding another.
  6. Send a test message from your own phone, check the row, then publish the workflow so it runs on every message, not only while you are testing.

If you rename a column later, the node's mapping goes stale. n8n's documentation says to re-select Mapping Column Mode so the node fetches the column names again.

How do you keep one row per lead instead of one per message?

The Messages tab grows with every message, which is right for a record and wrong for a lead list. Add a second tab, Leads, that gets one row the first time each person writes:

  1. Branch after the If node into a Remove Duplicates node: Remove Items Processed in Previous Executions, Keep Items Where Value Is New, with From as the Value to Dedupe On. Only a sender's first message gets through. As of October 2026 it remembers 10,000 values by default; raise History Size if you expect more leads than that.
  2. Add an Edit Fields (Set) node that sets Source with an expression that checks the message text for each of your pre-filled phrases and falls back to Unknown.
  3. Add a Google Sheets node with Append Row into Leads: first seen, From, Name, Arrived on, first message and Source, plus empty Owner, Status and Next follow-up columns for your team to fill in.

The Source column relies on pre-filled phrases. WhatsApp's click-to-chat links can carry a message that appears ready-typed in the customer's text box, so give each place you advertise its own wording: "Hi, I saw the Baner 2BHK listing" on a property portal, "Hi, I found you on your website" on the site, "Hi, I scanned your stall QR code" at a trade fair. The WhatsApp link generator builds these links. Customers can edit the text before sending, so treat Source as a strong hint rather than proof.

Two edge cases. On the first day, every existing customer who writes in counts as new, because the workflow has never seen them; mark them in Status. And because events can arrive out of order, the first message to reach the sheet is occasionally not the first one sent. The Messages tab, sorted by Time, keeps the full record.

Can you do it with Power Automate instead of n8n?

Yes. Microsoft publishes a Google Sheets connector, classed as standard, and the flow looks like this:

  1. Create a cloud flow that starts with When an HTTP request is received, save it to get the URL, and set who can trigger it to Anyone. The signature check below is what keeps strangers out.
  2. In WavesFlo, add a webhook destination with that URL, subscribed to the Messaging category. That category also carries sent, delivery-status, reaction and media events, so add a condition that continues only for message.received.
  3. Verify each delivery's signature in a small Azure Function, because Power Automate's expressions have no HMAC function. The Power Automate connector guide covers this and the licence.
  4. Add the Google Sheets connector's Insert row on the Messages sheet, writing the event's own timestamp rather than the time the flow ran.
  5. Open the trigger's settings, turn on Concurrency Control and set it to 1. Microsoft lists simultaneous changes from other flow runs, and manual edits, as unsupported for this connector, so people should read the log rather than edit it.

Four catches, all from Microsoft's documentation as of October 2026. Concurrency Control can't be switched off without deleting and re-adding the trigger, and with a limit of 1 only 11 runs can queue; a delivery turned away in a burst is sent again, because delivery is at least once. Get rows has no filter, so deduplicate in the sheet: a retried delivery writes an identical row, and a UNIQUE formula over the Messages columns, on its own tab, shows each event once. The connector allows 100 calls per connection every five minutes. And a spreadsheet in a shared drive won't appear in the file picker; Microsoft's workaround is to paste the spreadsheet's ID, the part of its URL between /d/ and /edit.

What about the messages your team sends?

Subscribe the workflow to message.sent as well and add a Direction column. That event fires when a message leaves a connected number, including one typed on the phone, and records where the send came from, so campaign messages can be left out. The latest row in each chat then shows who spoke last, a quick way to find leads still waiting for an answer.

Will old WhatsApp chats appear in the sheet?

No. The workflow logs messages that arrive after it is published, and in WavesFlo a chat's thread starts when its number was linked, so there is no earlier history to send. For one customer's older messages, WhatsApp's own Export chat produces a text file that a spreadsheet can split into columns; getting WhatsApp messages into Excel walks through it.

Google Sheets to WhatsApp: the other direction

This guide moves messages from WhatsApp into a sheet. The reverse, one personalised WhatsApp message per sheet row, is a campaign, covered in Google Sheets to WhatsApp, step by step. When the lead belongs in a CRM rather than a sheet, WavesFlo connects natively to HubSpot and Zoho CRM: once an admin switches syncing on, each one-to-one chat is added as a note on the matching contact. Other CRMs can take the same events as this sheet.

Keep the roles clear. WavesFlo isn't a CRM: it puts every number's chats in one shared inbox, where the team replies, and sends the events. n8n or Power Automate does the writing, and the sheet keeps the record. For the rest of the routine, see how sales teams work WhatsApp leads.

Illustration

Questions

Can I save WhatsApp messages to Google Sheets automatically?

Yes. A workflow in n8n or Power Automate receives each incoming message as a webhook and adds a row. WhatsApp has no built-in link to Sheets, so the number needs a service that sends an event per message, such as WavesFlo.

Is there a free way to connect WhatsApp to Google Sheets?

Partly. n8n's self-hosted Community edition is free as of October 2026, and its Google Sheets node costs nothing extra. Power Automate needs a premium licence for this flow. The WhatsApp side needs a service that sends a webhook for every message, which may carry its own cost.

Will my old WhatsApp chats appear in the sheet?

No. Only messages that arrive after the workflow is switched on are logged, and in WavesFlo a chat's history starts when its number was linked. For one chat's earlier messages, use WhatsApp's own Export chat and import the text file.

Can I log WhatsApp group messages in Google Sheets too?

Yes, if the service sending the events covers groups: WavesFlo's message.received event fires for groups as well as direct chats and says which kind of chat it came from, so send group messages to their own tab and keep the lead list to direct chats.

Does it work with several WhatsApp numbers?

Yes. With WavesFlo, one workflow receives the events for every connected number, and each event carries the id of the number it arrived on, so one sheet can serve several teams and be filtered by number.

How do I stop duplicate rows when logging WhatsApp messages?

Key every row on the event ID, which stays the same when a delivery is retried. In n8n, use the Google Sheets node's Append or Update Row matching on that column; with Power Automate, show the log through a UNIQUE formula on a separate tab.

Sources

Keep reading

See it on your own numbers.