Google Sheets

Integrate your Google Sheets with Mercuri to easily reach your customers or clients through WhatsApp, without needing to open the Mercuri Dashboard.

Follow the steps below to set up the integration instantly.

Step 1: Open Google Apps Script

  1. Open your Google Sheet

  2. Go to Extensions → Apps Script


Step 2: Create Required Files

You need to create the following two files:

  • Sidebar.html

  • Code.gs

A. To create the Sidebar.html file:

  1. Click the Plus (+) icon next to Files

  2. Select HTML

  3. Rename the file to Sidebar.html

⚠️ Make sure the file name matches exactly. Otherwise, the script may throw an error.

  1. Copy and paste the following HTML code into the file.

Sidebar.html


B. To Create the Code.gs File

  1. Click the Plus (+) icon next to Files

  2. Select Script

  3. Rename the file to Code.gs

⚠️ Ensure the file name is exactly Code.gs to avoid script errors.

  1. Copy and paste the following code into the editor.

Code.gs


Step 3: Deploy the Script

  1. Click Deploy in the top-right corner

  2. Select New Deployment

  3. Under Select type, choose Web App

  1. Fill in the required deployment details

  2. Click Deploy


Step 4: Configure the Mercuri API Key

  1. In the Apps Script editor, click the Settings icon from the left sidebar

  2. Scroll down to the Script Properties section

  1. Add the following property:

Property
Value

MERCURI_MESSAGING_API_KEY

Your Mercuri API Key

Click here to know how to create API Token in Mercuri


Step 5: Open the Mercuri Sender in Google Sheets

Once the integration is set up successfully:

  1. Return to your Google Sheet

  2. From the top menu bar, go to Mercuri → Open Sender

This will open the Mercuri WhatsApp Sender side panel on the left side of the sheet.


Step 6: Map the Fields

Map each required field with the corresponding column in your Google Sheet.

Recipient Column

  • Map the Recipient field to the column containing your customer or client phone numbers

Phone Number ID & Template ID

  • Enter the Phone Number ID and Template ID

  • These can be obtained from the Mercuri Dashboard

Click here to learn how to get the Phone Number ID and Template ID.


Step 7: Select Rows and Send Messages

You can select specific rows in the sheet to send messages only to those customers.

Once all fields are mapped:

  1. Select the required rows

  2. Click Send from the side panel

Last updated