# How to Automate WhatsApp Messages from Salesforce using Zapier

Integrating WhatsApp with Salesforce through Zapier simplifies how businesses communicate with clients and teams. This connection automatically sends out notifications and messages based on Salesforce activities. It improves customer interactions and makes communication more efficient. With WhatsApp's wide use worldwide, this integration brings many advantages.

{% hint style="info" %}
To turn on your Zap for using a Premium App, you'll need access to [premium apps](https://zapier.com/apps/categories/premium) on Zapier.
{% endhint %}

Let's explore the specific Salesforce events that can trigger automated WhatsApp messages through Gallabox integration.

### Salesforce Event Triggers <a href="#salesforce-event-triggers" id="salesforce-event-triggers"></a>

Below are the events for which you can trigger the WhatsApp Messages through Gallabox.

| Event                            | Description                                                                                                                                                                                |
| -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| New Contact                      | Triggers when a new Contact is created.                                                                                                                                                    |
| New Field History Tracking Event | Triggers when a specific field is updated on a specific object. This trigger outputs the old value and the new value of the field.                                                         |
| New Lead                         | Triggers when a new Lead is created.                                                                                                                                                       |
| New Outbound Message Instant     | Triggers when a new outbound message is received in Salesforce. New Record: Triggers when a record of the specified Salesforce object (i.e.. Contact, Lead, Opportunity, etc.) is created. |
| Updated Field on Record          | Triggers when a field of your choosing (i.e.. email address, status) is updated on any record of a specified Salesforce object (i.e.. Contact, Lead, Opportunity, etc.).                   |
| Updated Record                   | Triggers when any record of the specified Salesforce object (i.e.. Contact, Lead, Opportunity, etc.) is updated.                                                                           |

Now that you're familiar with the Salesforce event triggers, let's move on to how you can create workflows in Zapier to automate WhatsApp messages through Gallabox.

### Workflow creation in Zapier Dashboard using Co-pilot <a href="#workflow-creation-in-zapier-dashboard-using-co-pilot" id="workflow-creation-in-zapier-dashboard-using-co-pilot"></a>

1. In your Personal folder in Zapier account, click on **Create** and then select **Zap**.

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FDnJKCQPNktYtscppu5Us%2FCreate%20a%20Zap.gif?alt=media&#x26;token=52ef0bbe-d1ed-4ef7-9d75-a48b8027615c" alt=""><figcaption></figcaption></figure>

2. To use AI to create all the steps in a Zap, explain the use-case in simple language. For Instance, When a contact is added on Salesforce an automatic WhatsApp Message should be sent via Gallabox. The Zap Outline will be created and add all the generated steps in the Zap.

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FPIN8zYqO1jWu1nSwFDOY%2FZapier%20Co-pilot.gif?alt=media&#x26;token=0ee39c64-0a9c-4a91-ae91-998dd26d52c0" alt=""><figcaption></figcaption></figure>

3. Next step is to configure the first step in the Zap i.e. Connecting your Salesforce Account. Click on Open Step. Sign in to your Salesforce Account.

{% hint style="info" %}
Grant access to Zapier to access the records in Salesforce.

<img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FEjHNKSlFRKxhbruVCMQz%2FOAuth-for-Salesforce.gif?alt=media&#x26;token=fb0b3e47-67b6-411d-ac59-a1fa9cc5e93d" alt="" data-size="original">
{% endhint %}

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FQRRXjbSf1qazOFbnIbny%2FSign%20into%20Salesforce%20Account.gif?alt=media&#x26;token=fa759f61-e133-4b2d-8229-88d211615cbd" alt=""><figcaption></figcaption></figure>

4. After connecting your Salesforce Account, see if the account is set up correctly. Click on **"Test Trigger"** to get the details of the contact. A record will be selected, check if you are getting all the contact details. Click on **"Continue with selected record"** to proceed further.

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FrzF7rnGvGn6OheYCOeFQ%2FTest%20Trigger%20in%20Salesfroce.gif?alt=media&#x26;token=a1261c23-93ae-4e35-b528-13f4974d727b" alt=""><figcaption></figcaption></figure>

5. Moving to 2nd step of the Zap i.e. Configuring the event which will happen when the zap runs. There are three events to choose from - \
   \- **Send Whatsapp Template Message** \
   \- **Send WhatsApp Template Payload Message** \
   \- **Upsert Contact**

Choose the event as per your needs.

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FdT5c07ZTs2mFywhjaBSy%2FChoose%20the%20event%20for%20Salesforce.gif?alt=media&#x26;token=6a817a85-59f6-4732-86fd-3e445c67abe7" alt=""><figcaption></figcaption></figure>

6. Sign in on your Gallabox by adding [Account Id](https://docs.gallabox.com/account-management/account-details#account-id), API Key, and API Secret when prompted.

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FO81DPEqX2XyC4VYXpnz0%2FConnecting%20Gallabox%20in%20Zapier.gif?alt=media&#x26;token=cc6c2051-0a5e-4aa9-b060-9b3c0b2c33c4" alt=""><figcaption></figcaption></figure>

7. To send the WhatsApp Template, map the receiver Name & phone number from Salesforce fields. Select the WhatsApp Template you would like to send, map the values for the variables defined in the WhatsApp Template. If the media exists in the template, provide the media name & media URL as well.

{% hint style="info" %}
If you are not able to see the desired template in the dropdown, click on Load more until the template is found.
{% endhint %}

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FGuRrWHib0sJipUqG6YbU%2FMap%20the%20Fields.gif?alt=media&#x26;token=d8c18c7e-1bc2-477d-8119-31cbdb44a2b1" alt=""><figcaption></figcaption></figure>

8. After adding the values for the fields, test if the WhatsApp Message is going to the record. You will get the confirmation when Message Template is successfully shared with the Record.

<figure><img src="https://docs.gallabox.com/~gitbook/image?url=https%3A%2F%2F3137140735-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FZcl3T6ePz95GpzjAeOLW%252Fuploads%252FQSWTZ8kWCkEoxyHTwQD5%252FTest%2520WhatsApp%2520Message.gif%3Falt%3Dmedia%26token%3D4d9657b9-205c-4a3a-b80d-63fbf3cd27dc&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=7ecb786a&#x26;sv=1" alt=""><figcaption></figcaption></figure>

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2Fi7y8zjO41TgsSOarILm3%2FTest%20WhatsApp%20Message.gif?alt=media&#x26;token=5ee5c67e-7b6f-4db4-8c12-cac6dcacbf0f" alt=""><figcaption></figcaption></figure>

9. Once you get the confirmation, click on Publish to make the Zap live.

<figure><img src="https://33771963-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPdT5fOiFJnHBqGdwIkkL%2Fuploads%2FVDjfUzmh0Br6lgMhOon3%2Fimage.gif?alt=media&#x26;token=467d44e9-7859-49be-8e05-c537ed86516d" alt=""><figcaption></figcaption></figure>

That is it. This connection will automatically send out notifications and messages based on Salesforce activities you have configured.&#x20;
