Integrating the WhatsApp Business Platform with HubSpot
HubSpot is a customer relationship management (CRM) platform that helps businesses sell, market, and provide customer service for their goods and services more successfully.
Through WhatsApp integrations, businesses can leverage the Cloud API hosted by Meta to engage with clients straight from their CRM through the WhatsApp Business Platform. This enables direct interaction with the majority of current tech stacks and offers simple access to messaging features.
In this article, we’ll look at how to set up this kind of HubSpot integration and build a process in the CRM that will allow messages from WhatsApp to be automatically responded to based on events and specific rules on the HubSpot platform.
Required conditions
To finish this tutorial, you will require:
An account on WhatsApp Business.
An account on Meta for developers.
A HubSpot App Developer account (if you’re making a new account, choose App Developer). Access to CRM APIs and app creation are among the benefits and services that Hubspot App Developer accounts offer, as stated in their terms and conditions.
a URL that directs them to the example Glitch app that is now running in order to receive WhatsApp Business Messenger messages.
This post assumes you have some knowledge of HubSpot, Meta for Developers, and the WhatsApp Business Platform.
Set up the Cloud API Webhook
Next, set up the webhook for the API to allow subscriptions to updates or responses to event changes by starting from the Meta for Developers App Dashboard for your app. Click the navigation bar for WhatsApp. Then, under Getting Started, click Configuration, then click Edit.
Complete the Callback URL and Verify token fields in the Edit webhook’s callback URL dialogue box. The callback URL will be https://<<PROJECT NAME>>.glitch.me. Replace project name with the name of your project (e.g. https://defiant-standing-mirror.glitch.me). Then verify the URL is the same as above.
Click Verify and save. Check out the developer guide for more details on the WhatsApp webhook setup.
Now you can send test notifications to the endpoint.
Click Webhook fields under the Edit button on the same page. Then, click Manage to subscribe to the events you want to watch using the endpoint. After that, select Test to send a notification to the previously chosen recipient phone number.
Go to Glitch, click Logs, and inspect the logs for the event you have chosen to confirm that the app is active and listening for events.
Setting up the HubSpot CRM
You have now configured the HubSpot CRM to send WhatsApp messages to clients automatically if their contact information includes a phone number.
Go to the HubSpot platform and sign in or register for a new developer account. To test the HubSpot API and tools, the developer account offers a 90-day free trial of all HubSpot’s enterprise services, including marketing, sales, service, and CMS.
Click Manage test accounts once your developer account has been configured.
Then select Create an app test account, name it demo_whatsapp_integration (or whatever you’d like) and click Create.
Click the newly created app test account and navigate to its dashboard. Then click Contacts on the top left of the navigation bar. You will see two demo contacts. Feel free to remove them and add a new contact that includes a test phone number to use for WhatsApp testing.
Connect WhatsApp With HubSpot CRM
Next we’ll need to install a WhatsApp integration with HubSpot CRM. First, go to Settings in HubSpot. Under Account Setup, click Integrations, followed by Connected Apps.
Select Visit App Marketplace. Use the Search field to search for the WhatsApp application. Click WhatHub: WhatsApp Integration.
Select the demo_whatsapp_integration account and click Choose Account. You’ll then be able to see a WhatsApp icon on the contact page next to the other contact options. Click it to begin sending messages from the HubSpot CRM. You can use either custom messages or the predefined templates.
You’ll be able to see a list of messages and their status on the Activity tab as well.
Setting Up an Automated Workflow
Next, we’ll incorporate this into a workflow triggered by an event in the CRM. To do this, we’ll set up a custom workflow from the HubSpot dashboard. Click Automation in the navigation bar and then click Workflows to open the Workflow dashboard.
Click Create workflow and select the From scratch option. Now, click Contact-based, followed by next.
Click Set up triggers and select the WhatsApp message sent from HubSpot portal integration event option.
Select the Message sent filter type, set the workflow trigger to “is equal to any of,” and specify the value as Buy item. Finally, click the Apply filter and then Save.
Next, click the + icon and add another action. On the Choose an action list, click Create task.
Name it “Test Task” and assign it to your test account then click Save. Next, click Review, publish, and turn on the workflow by clicking “Turn on” in the window’s top-right corner.
Now, select Test and choose your test contact to test the workflow. This triggers the workflow, as shown below.
Next, we’ll create an integration that listens for WhatsApp and automatically updates data in the HubSpot CRM when a notification is received. Before setting up the workflow, we need to add the test contact to a list. Click Contacts, then Lists, to create a new list.
Once that’s done, navigate to the Workflow page and create a new workflow and name it “WhatsApp Automation.”
Select contact-based lists, add the list name, then select static list. Click Next and then click the + Add filter button.
Now, choose List membership from the Add filter list to add it as a filter and then click Save list.
Now you can continue setting up the workflow. Do this by selecting Contact-based and add the contact enrollment trigger to the List membership.
Set up a task to be triggered when this workflow is activated. Check that this task appears in the Actions timeline, and click Save.
On the Choose an action list, click Send a webhook.
Next, create an action for the workflow to send the payload to the endpoint when the workflow is triggered.
Make sure you use the URL you set up previously in the tutorial. Click Save. Finally, proceed to test the workflow like you did before: open the Test list, select your test contact from the Preview for list, and click Test. The workflow is complete.
Now let’s check your logs and Actions timeline. Navigate back to the Actions timeline to review the created task.
To check your logs, go back to your running Glitch app and view the Logs to confirm message delivery.
2 thoughts on “Integrating the WhatsApp Business Platform with HubSpot”
What’s up, just wanted to tell you, I enjoyed this article.
It was practical. Keep on posting!
Hey there, I think your blog might be having browser compatibility
issues. When I look at your blog in Opera, it looks fine but when opening
in Internet Explorer, it has some overlapping. I just wanted
to give you a quick heads up! Other then that, amazing blog!