Skip to content

The moment it happens

Forward WhatsApp Business messages to Gmail

Each message a customer sends to your WhatsApp Business number is emailed from your Gmail to a chosen inbox, with the sender's name and number in the subject.

Runs
The moment it happens
Apps
Gmail, WhatsApp Business
AI
Not needed
Access
WhatsApp messaging webhook; Gmail send

Send this to your assistant

Create a ClickRuntime automation: when a customer messages my WhatsApp Business number, email the message from my Gmail to support@mycompany.com with their name and number in the subject, keeping each customer in one email thread.

Paste it into your assistant. It tells you what it will send or change before it runs live.

First time? Adding ClickRuntime to your assistant takes about two minutes.

Why use it

Why teams use this automation

When customers write on WhatsApp, the messages usually land on one phone or one person's WhatsApp Business login. The rest of the support team works in email and never sees them.

This sends a copy of every incoming WhatsApp message to a shared inbox from your Gmail account. Messages from the same customer stay together in one email thread, with their name and number in the subject.

It suits small shops, clinics, tradespeople and support teams who take orders and questions on WhatsApp but track their work in email.

What you get out of it

  • One inbox for every channel

    WhatsApp questions sit next to email questions, so nobody has to check a separate phone to know what customers are asking.

  • Threads per customer

    Every message from the same number joins one thread. The full conversation is easy to read in order.

  • Searchable record

    Email search finds an order number or a complaint months later. WhatsApp alone is much harder to search across customers.

  • Nothing changes for customers

    Customers keep using WhatsApp as before. The copy to email happens in the background.

  • Works with your Gmail rules

    Labels, filters and shared inboxes you already use in Gmail apply to these emails too.

How it works

What happens, step by step

  1. WhatsApp sends ClickRuntime each incoming message on your business number.

  2. ClickRuntime reads the customer's name, number and message. Photos and documents are noted with their caption.

  3. The message is emailed from your Gmail to the inbox you choose, with the name and number in the subject.

  4. Later messages from the same customer go into the same email thread.

Before it runs live

  • Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
  • Connect WhatsApp Business
  • Paste your automation's link into the other app's webhook settings

What you get

RunsThe moment it happens
Forward WhatsApp Business messages to Gmailjust nowSucceeded
Email · WhatsApp from Maria Lopez (+34 612 345 678)Hi, I ordered the oak shelf last week (order 10482) and it hasn't shipped yet. Can you check? Received on WhatsApp at 14:32.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • Your own rules

    Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.

  • Any number of apps

    One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.

  • AI where it helps

    Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.

  • On a schedule or on each event

    Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.

Changes you can ask for

  • Act only on the items that match your own rules, and skip the rest
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Gmail and WhatsApp Business steps into one automation

Under the hood

The code that runs this automation

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
forward_whatsapp_business_messages_to_gmail.pyexample
import base64
from email.message import EmailMessage
from datetime import datetime
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_event, credentials, state

TO = "support@mycompany.com"
gmail = lambda: build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users()

def incoming(event):
    for e in (event.json or {}).get("entry", []):
        for c in e.get("changes", []):
            v = c["value"]
            names = {x["wa_id"]: x["profile"]["name"] for x in v.get("contacts", [])}
            for m in v.get("messages", []):
                yield m, names.get(m["from"], "")

@on_event
def handle(event):
    sent = 0
    for m, name in incoming(event):
        t = m["type"]
        text = m["text"]["body"] if t == "text" else f"[{t}] " + (m.get(t, {}).get("caption") or "(no caption, open WhatsApp to view)")
        subject = f"WhatsApp from {name or 'customer'} (+{m['from']})"
        msg = EmailMessage()
        msg["To"], msg["Subject"] = TO, subject
        msg.set_content(f"{text}\n\nReceived on WhatsApp at {datetime.fromtimestamp(int(m['timestamp'])):%H:%M}.")
        body = {"raw": base64.urlsafe_b64encode(msg.as_bytes()).decode()}
        thread = state.get(f"thread:{m['from']}")
        if thread:
            body["threadId"] = thread
        res = gmail().messages().send(userId="me", body=body).execute()
        state.set(f"thread:{m['from']}", res["threadId"])
        sent += 1
    return {"forwarded": sent}

FAQ

Common questions

Does the customer see anything different on WhatsApp?
No. Their message is delivered to your WhatsApp Business number as normal. This only sends a copy to email.
What happens with photos and voice notes?
The email says what kind of message it was and includes any caption. The file itself stays in WhatsApp; ask your assistant to download and attach media if your team needs it in the inbox.
How do I set it up in Meta?
In your WhatsApp Business app settings on Meta for Developers, point the messages webhook at the trigger link ClickRuntime gives you. Your assistant walks you through the verify token step.
What permissions does it need?
WhatsApp messaging webhook; Gmail send. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run for each event the app sends.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

Set up “Forward WhatsApp Business messages to Gmail” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.