Let’s explore how you can integrate WhatsApp with Google Sheets and set up an automated system to save received WhatsApp messages in a new row of your Google Sheets spreadsheet using the WhatsApp Cloud API.
This automation requires a one-time setup, for which we will use Pabbly Connect.
We will first link WhatsApp with Pabbly Connect to capture the messages received, then link Pabbly Connect with Google Sheets and save the captured messages in your Google Sheets spreadsheet.
Steps to Save WhatsApp Messages in Google Sheets
1. Sign In / Sign Up to Pabbly Connect and Create a Workflow
2. Establish a Connection between WhatsApp and Pabbly Connect
3. Setup Google Sheets as the Action App to Save Messages
Step 1:- Sign In / Sign Up to Pabbly Connect and Create a Workflow
A. Sign In / Sign Up
To begin this process, visit Pabbly Connect and create your account by clicking on the ‘Sign Up Free’ button. You can also click on Sign In if you already have an account.
Click on the Pabbly Connect ‘Access Now’ button
B. Create Workflow
To create a new workflow, click the ‘Create Workflow’ button.
Name your workflow, and click on ‘Create’.
Step 2:- Establish a Connection between WhatsApp and Pabbly Connect
We will now look at the steps through which we will establish a link between WhatsApp and Pabbly Connect – this will help us capture new WhatsApp messages.
Trigger allows us to choose the application that will receive the data for Pabbly Connect. In our case, it would be WhatsApp Cloud API.
Note: Follow steps 1 to 3 of this blog to create a new Whatsapp Business Cloud API account if you don’t already have one.
A. Trigger App
Choose ‘WhatsApp Cloud API’ as the Trigger App, and select ‘Message Notification’ as an Action Event.
B. Webhook URL
A new Webhook URL will get generated. You will use this Webhook URL to create a connection with your WhatsApp account. Copy the Webhook URL.
As soon as you Copy the Webhook URL, Pabbly Connect will start looking to capture data from WhatsApp, as indicated by the rotating Waiting For Webhook Response button.
C. Establish Connection
Switch to your Facebook Developers dashboard, and click on WhatsApp > Configuration > Edit.
Paste the Webhook URL we copied earlier, enter ‘pabbly_fb_webhook_token’ as the Verify Token, and click on ‘Verify and save’.
Now, click on ‘Manage’ > ‘Subscribe’ messages, and your connection will be established.
D. Test Connection
To verify the established connection, send a WhatsApp message, and then expand the Response Received section to confirm the test message is visible.
Step 3:- Setup Google Sheets as the Action App to Save Messages
Action allows us to choose the application that will get executed by the workflow trigger.
We essentially want to save the captured messages in a Google Sheets spreadsheet. Therefore, Google Sheets will be our Action App.
A. Action App
Choose ‘Google Sheets’ as the Action App, select ‘Add New Row’ as an Action Event, and click on ‘Connect’.
B. Connect Google Sheets Account
To connect with your Google Sheets account, select ‘Add New Connection’, and click on ‘Connect With Google Sheets’. Also, grant the authorization.
Choose the specific Spreadsheet and Sheet that you wish to utilize for storing the messages.
As soon as you select your sheet, the columns of this sheet will start reflecting as fields in your Action Step.
C. Map Necessary Fields
After successfully connecting your Google Sheets account, the next step is to map the relevant details from the above step. Mapping ensures our data remains dynamic and changes as per the received messages.
Map the Name from the step above.
Similarly, map the other fields, and click on ‘Save & Send Test Request’.
When you click on Save & Send Test Request, the message will automatically be saved in a new row of your Google Sheets spreadsheet.
The automation process is now finished, and we have successfully integrated WhatsApp with Google Sheets. From this point forward, every time you receive a WhatsApp message, it will be automatically saved to your Google Sheets spreadsheet.
You can copy this entire workflow by clicking this link.
Sign Up for a free Pabbly Connect account, and start automating your business
Subscribe to our Youtube Channel for more such automation
For any other queries, visit our forum