ProductsDocsBlogConsultingAboutContactGet Started
Back to BlogA shop owner after closing sorting order slips into two piles, one clearly taller than the other, her phone lying face down beside her hand — seeing which conversations actually turned into work.
7 min readMageSheet Team

Sync WhatsApp Conversation Data to Google Sheets: Leads, Response Times and Outcomes

WhatsAppGoogle SheetsSales ReportingApps ScriptWebhooksAnalyticsAutomation

If your sales team works out of WhatsApp and you report in Google Sheets, the honest answer to "which platform syncs the data" depends entirely on which WhatsApp you are using — and for one of the three, the answer is that no platform can.

  • The WhatsApp Business app on a phone? Nothing can sync it. No API exists. Manual per-chat text export only.
  • A shared-inbox platform (respond.io, Wati, Zoko, Trengo and similar)? Most offer a Sheets integration or a REST API you can pull on a schedule.
  • The WhatsApp Business Platform (Cloud API)? Webhooks push every message to a URL you control. Point that at an Apps Script web app and your sheet fills itself, with no platform in the middle.

There is a second thing worth knowing before you pick: the metrics you want are not fields anyone exports. "Leads handled", "first response time" and "outcome" are things you derive from message traffic. That derivation is the actual work, and it is the same regardless of which route brings the messages in.

The three routes

Business app (phone)Inbox platformCloud API direct
Automatic syncNoUsuallyYes
Setup effort—MinutesA day
Monthly costFreePer seat, typically $20–$60Meta's message rates only
Data you getManual text exportWhatever they exposeEverything, raw
Custom metricsNoTheir fieldsAnything you can compute
Who holds the dataThe phoneThe vendorYou

The middle route is the right call if you already pay for a shared inbox — check for a Sheets integration first, and an API second. Pull it on a schedule with UrlFetchApp exactly as you would any other API.

The rest of this covers route three, because it is the one that gives you the metrics nobody else's export has.

What lands in the sheet

With the Cloud API, Meta POSTs a webhook every time a message arrives or a status changes. Deploy an Apps Script web app (Deploy → New deployment → Web app, access Anyone) and register its /exec URL in your Meta app's webhook settings.

Meta verifies the endpoint first with a GET, so you need both handlers:

const VERIFY_TOKEN = 'pick-a-long-random-string';

function doGet(e) {
  // Meta's one-time subscription handshake
  if (e.parameter['hub.verify_token'] === VERIFY_TOKEN) {
    return ContentService.createTextOutput(e.parameter['hub.challenge']);
  }
  return ContentService.createTextOutput('forbidden');
}

function doPost(e) {
  const body = JSON.parse(e.postData.contents);
  const sheet = SpreadsheetApp.getActive().getSheetByName('Messages');
  const rows = [];

  (body.entry || []).forEach(entry => {
    (entry.changes || []).forEach(change => {
      const v = change.value || {};
      const agentNumber = (v.metadata || {}).display_phone_number || '';

      // Inbound: a customer wrote to you
      (v.messages || []).forEach(m => {
        rows.push([
          new Date(Number(m.timestamp) * 1000),
          'inbound',
          m.from,                              // customer's number
          agentNumber,
          m.type,
          (m.text || {}).body || '',
          m.id,
        ]);
      });

      // Outbound: delivery/read status of messages you sent
      (v.statuses || []).forEach(s => {
        rows.push([
          new Date(Number(s.timestamp) * 1000),
          'status:' + s.status,                // sent | delivered | read | failed
          s.recipient_id,
          agentNumber,
          '',
          '',
          s.id,
        ]);
      });
    });
  });

  if (rows.length) {
    sheet.getRange(sheet.getLastRow() + 1, 1, rows.length, 7).setValues(rows);
  }
  return ContentService.createTextOutput('EVENT_RECEIVED');
}

Two notes that save an afternoon. WhatsApp timestamps are Unix seconds, not milliseconds — multiply by 1000 or every row lands in 1970. And webhooks arrive batched, so handle arrays and write once with setValues; a busy hour with appendRow in a loop will time out. The general patterns are in our Apps Script webhooks guide.

Meta retries failed webhook deliveries, so return quickly. Do the parsing here and the analysis on a trigger — never make Meta wait while you compute a dashboard.

Turning messages into the three metrics

Raw messages are not a report. Run a second script on a trigger that rolls the Messages tab into a Conversations tab — one row per customer per conversation — and compute:

Leads handled. Count distinct customer numbers with at least one inbound message in the period. Decide once whether a returning customer is a new lead or the same one; both are defensible, inconsistency is not.

First response time. The gap between the first inbound message opening a conversation and the first human outbound reply. Two exclusions are essential:

  • Do not count automated replies or template messages. An auto-acknowledgement is not a response. Count it and your median drops to four seconds and tells you nothing.
  • Subtract time outside business hours. Otherwise one enquiry at 11pm ruins the week's average and your team is measured on when customers happen to write.

Outcome. This one cannot be derived, because it is a judgement about what happened. The pattern that works is a dropdown — Won, Lost, No Response, Not a Fit — that the agent sets on the conversation row, with everything else auto-filled around it. You can have an AI pass suggest an outcome from the transcript, and that is genuinely useful at volume, but keep a human confirming it. Our guide to grounding AI on your own data covers making those classifications reliable rather than plausible.

With the Conversations tab in place, the dashboard is formulas:

MetricFormula
Leads this month=COUNTIFS(Conversations!B:B, ">="&EOMONTH(TODAY(),-1)+1)
Median first response (mins)=MEDIAN(FILTER(Conversations!E:E, Conversations!E:E>0))
Win rate=COUNTIF(Conversations!F:F,"Won") / COUNTA(Conversations!F:F)
Unanswered over 1 hour=COUNTIFS(Conversations!E:E, ">60")

That last one is the one people actually act on. A daily trigger that emails the list of conversations still unanswered after an hour changes behaviour in a way a monthly dashboard never does.

The constraints worth knowing up front

The 24-hour window. You can reply freely for 24 hours after a customer's last message. Outside it, only approved template messages — which are billed and which do not count as a response for your response-time metric. This shapes your whole follow-up process, not just your reporting.

Never automate the consumer app. Scraping WhatsApp Web or driving the desktop client breaks WhatsApp's terms and gets numbers banned. Losing the channel your customers use is a far larger cost than any dashboard is worth.

Treat transcripts as personal data. A conversation log is personal data under GDPR and similar regimes. Store the fields you report on rather than every message body, keep the sheet inside your Workspace domain rather than link-shared, set a retention period, and be able to delete one person's rows on request.

Meta's pricing moves. The billing model has been revised several times. Check the current rate card — and note that receiving messages and webhooks is the cheap side; business-initiated messaging is what costs.

Where this leads

Once conversations are in a sheet, the reporting is the small win. The larger one is that WhatsApp stops being a black box that only the person holding the phone can see into. Response times become manageable, leads stop being forgotten in an inbox, and the channel joins the rest of your sales reporting.

From there, the same message stream drives the rest: auto-logging leads into a WhatsApp AI CRM in Google Sheets, or automating the replies themselves as covered in automating WhatsApp sales with Google Sheets. If you are still choosing an approach, our comparison of the three ways to automate WhatsApp lays out what each really costs.

The reporting pipeline itself costs nothing beyond Meta's message rates — Apps Script is free, and the sheet is one you already own. The work is in defining the metrics honestly and handling the edge cases: business hours, automated replies, returning customers, deletions.

If you want that built against how your team actually works, tell us what you need to see each Monday morning. The feasibility review is free, and if your existing inbox platform already exports what you need, we will tell you to use it.

Frequently Asked Questions

Which platform exports WhatsApp conversation data to Google Sheets?

There are three, and which applies depends on how you use WhatsApp. If you are on the free WhatsApp Business app on a phone, no platform can sync it — the app has no API, and only a manual per-chat text export. If you use a shared-inbox product such as respond.io, Wati, Zoko or Trengo, most offer either a Google Sheets integration or a REST API you can pull from on a schedule. If you are on the WhatsApp Business Platform (Cloud API) directly, webhooks push every message to a URL you control, and an Apps Script web app can be that URL — writing each message into a sheet as it happens, with no third-party platform in between.

Can I get WhatsApp data into Google Sheets without the API?

Not in any form you can report on. The WhatsApp Business app lets you export a single chat as a text file, one conversation at a time, by hand — useless for a dashboard that needs to stay current. Scraping WhatsApp Web or automating the desktop client violates WhatsApp's terms and risks the number being banned, which for most businesses means losing the channel their customers actually use. If you need conversation data flowing automatically, you need the Business Platform or a provider built on it.

How do you measure WhatsApp first response time?

Define it precisely before you build anything: the elapsed time between the first inbound message that opens a conversation and the first outbound message from a human agent in reply. Two exclusions matter — automated replies and template messages should not count as a response, or your numbers will look excellent and mean nothing, and time outside business hours should be subtracted, or every overnight enquiry ruins the average. With every message timestamped in a sheet, that becomes a formula per conversation rather than a feeling.

How do I track lead outcomes from WhatsApp conversations?

Outcome is the one field that cannot be derived from message traffic, because it is a judgement about what happened. The reliable pattern is a lightweight one: keep a Conversations tab with one row per contact, auto-populated with the message counts and timings, and one Outcome column the agent sets from a dropdown — Won, Lost, No Response, Not a Fit. An AI classification pass over the transcript can suggest an outcome, but treat it as a suggestion a human confirms; a dashboard that silently mislabels deals is worse than no dashboard.

What does the WhatsApp Business Platform cost to run for reporting?

Meta bills per message or per conversation and has revised the model several times, so check the current rate card rather than any published figure. For reporting specifically, the important point is that inbound messages and webhooks are the cheap part — you are charged for business-initiated messaging, not for receiving. If you are only logging conversations to a sheet and replying inside the 24-hour customer service window, the cost is typically small. Apps Script itself adds nothing, since it is free to run.

Is it legal to log customer WhatsApp conversations in a spreadsheet?

In most jurisdictions yes, with obligations. Under GDPR and similar regimes a conversation transcript is personal data, so you need a lawful basis, a retention period, and the ability to delete a person's records on request. Practical measures: store what you need for reporting rather than every message body, restrict who can open the sheet, keep it inside your Workspace domain rather than shared by link, and set a retention rule that deletes old transcripts. Talk to whoever handles your data protection before this becomes a permanent archive.

Stay Updated

Get the latest insights on AI, e-commerce, and Magento delivered to your inbox.