How to Send WhatsApp Messages from Google Sheets using the WhatsApp API

How to Send WhatsApp Messages from Google Sheets using the WhatsApp API

WhatsApp API

If you’re looking to reach a wider audience with your messages, WhatsApp is a great platform. And with the WhatsApp API, you can send messages directly from Google Sheets.

Here’s a step-by-step guide on how to set up the WhatsApp API with Google Sheets:

Step 1: Create a WhatsApp App

To use the WhatsApp API, you first need to create a WhatsApp application. You can do this through the WhatsApp Business app (download for Android or iOS) or the WhatsApp Business API. If you have an existing WhatsApp account for your business, you can use the WhatsApp Business API to create a new application.

If you don’t have a WhatsApp account for your business, you can create one through the WhatsApp Business app.

Once you have created a WhatsApp account for your business, you will need to create a new application. Open the WhatsApp Business app and tap on the three lines in the top left corner of the main screen. Then tap on “Business Settings” and select “Create a new application.”

Enter the following information about your new application:

Name: The name of your new application.
Description: A brief description of your new application.
Application Type: Select “WhatsApp Web.”
Status: Select “Enabled.”
Once you have entered these details, tap on “Create.”

Once you have entered these details, tap on “Create.”

Step 2: Add Recipient’s phone number

To send a message using the WhatsApp API, you need to have someone’s phone number you want to reach. The best way to do this is to add the phone number to your Google Sheet.

Are you currently developing a WhatsApp app? If so, you’ll be glad to know that Facebook is now offering a test WhatsApp phone number that you can use as your app’s default sending address.

With this new feature, you’ll be able to add an utmost of 5 phone numbers during the development phase without making any payment. WhatsApp will also provide you with a temporary access token that will be valid for 23 hours.

This is a superb way to test your app without worrying about incurring any costs. So if you’re currently working on a WhatsApp app, be sure to take advantage of this new feature!

Step 4: Add your API key to your Google Sheet.

Once you’ve registered for a free trial, you’ll be given an API key. This key needs to be inserted into the Google Sheet we created earlier.

To do this, open the Google Sheet and select Tools > Script Editor.

In the Script Editor, select File > Make a copy… to save a copy of the spreadsheet to your own Google Drive.

You can find your API key by logging in to the Google Developers Console and selecting your project. Under the APIs & auth section, you will find your API key. Then, insert your API key in the following location:

Click File > Save and close the Script Editor.

When you open the Google Sheet, you will see your app’s usage data in the last 24 hours.

Step 5: Create WhatsApp Message Template.

You can create a message template now that you have your recipient’s phone number and your WhatsApp API key. The best way to do this is to create a new column labeled “Message Template” in your Google Sheet.

In this column, you’ll want to write out the message you want to send to your recipients. You can use variables in your message template by enclosing them in double curly braces. For example, if you want to include the recipient’s name in your message, you would write {{name}} in your message template.

Once you’ve written out your message template, you can use the WhatsApp API to send the message to your recipients. You’ll need to make a POST request to the /message endpoint to do this. In the request body, you’ll need to include the phone number of the recipient, your WhatsApp API key, and the message template.

Here’s an example of what the request body would look like:


“phone”: “1234356789”,

“api_key”: “YOUR_API_KEY”,

“template”: “Hi {{name}}, thanks for signing up!”


Once you’ve made the request, you should receive a response from the API. If the request were successful, the response would include a message_id. You can use this message_id to check the status of the message later.


If you’re looking for a quick and easy way to send WhatsApp messages to your customers, you may want to consider using the WhatsApp API with Google Apps Script.

The WhatsApp API then sends the message to the customer’s phone number.

That’s all there is to it! Using the WhatsApp API with Google Apps Script is a quick and easy way to send WhatsApp messages to your customers.

Share this Article
Leave a comment

Leave a Reply

Your email address will not be published. Required fields are marked *