How do I send WhatsApp messages using Google Sheets using the WhatsApp API

This guide explains how you can utilize the brand new WhatsApp API in conjunction with Google Apps for sending WhatsApp messages via Google Sheets. This same method could be effective for sending WhatsApp messages using Google Forms when new form submissions are received.

Step 1: Create a WhatsApp App

Select Business as the app type.

Create an appropriate name (do not include any Facebook trademarks such as WhatsApp or Facebook in the name of your app) and then click the Create App button to build the application.

After the app has been developed, you can select to the WhatsApp option on your next screen to enable WhatsApp messaging capabilities to your application.

In the next screen you'll need to connect the WhatsApp application on the next screen to Facebook. Facebook corporate account. There is also the option of creating the business account from scratch in the event that you don't yet have on

Step 2: Add the Recipient's phone number.

Facebook will give you the test WhatsApp phone number, which will serve as the default sender of your application. For users, you'll have the option of adding up to 5 numbers in the development phase, without needing to pay any fee.

The WhatsApp application will issue you an access token temporary that is valid up to 23 hours. Keep a record of the token, as we'll need it later on.

Then, select in the box that says Recipient Phone Number and add up to five different WhatsApp telephone numbers into your application. Then, you'll receive a verification number for the new numbers, and will be able to send WhatsApp messages only to numbers that have been verified using the verification code.

Read : How to Recover a Gmail Account

Step 3: Create WhatsApp Message Template

Change to template management and then create an entirely new WhatsApp template for your messages.

In this case we'll select the Account Update category and create a unique name for your template message. In terms of languages, we'll select English where it is the language coded the en. If you're using a different language, keep track of the language used in the code, since it's required to send messages.

Write the Personalized Message


The message uses variables in the parameters of the message. These parameters will be replaced with actual values of Google Sheet. It's very like markers you have previously used within Mail Merge and Document Studio but with one minor difference: they are positional markers, and not identified markers.

Step 4: Send WhatsApp Messages

After all the settings on the Facebook side and the WhatsApp side is completed Let's begin working with our Google Sheet that will actually send these customized WhatsApp messages in a streamlined way.

After that, enter the numbers of your phone (with Country Code) in the phone number column in Google Sheet. It is recommended to only include numbers you've verified using the test WhatsApp account in the first step.

Go on to the Extension menu, and then select Apps script to open the script that runs underneath.

Select the Run button within the Apps Editor and it will instantly transmit WhatsApp message to your specified number.

Below shows the exact WhatsApp message that is sent out through WhatsApp API. WhatsApp API replacing the variable markers in the template by actual values taken from Google Sheets.


Post a Comment

Previous Post Next Post