# Pabbly

{% hint style="info" %}
The MyAlice<>Pabbly Integration is still in Private Beta. If you need access, please go to [this](https://connect.pabbly.com/share-app/CEBSYF8IBWYHTVI4AlFXcFtPVVEEXQBlVUwCEFxTUysESgNoDE0KYAxAWHpTHAJjBUxVP1MMUzcMGAAEVQNSIVJcUkcBHgdaADMDRgRbACoIalIlXxQFPwdWUmECSldtW1RVcgRJAF1VWAJhXEdTFQRdA3gMQQoEDExYMFMcAigFSFU8UwpTcww1) link and login with your Pabbly account to get the access.&#x20;
{% endhint %}

With [Pabbly](https://www.pabbly.com/connect/), you can build powerful automations with zero technical knowledge.

Currently we have 3 actions available for Pabbly:

* Create a Customer in WhatsApp
* Send a WhatsApp Template Message
* Send a Text Message in any MyAlice Channel

## Creating a Customer in WhatsApp with Pabbly

### **Sample scenarion:**

* Your customer has placed an order in your WooCommerce Store. You want to create a Customer in MyAlice WhatsApp to send a message.
* Someone signed up from your lead generation form. You want to create a Customer in MyAlice WhatsApp to send a message.

### Setting up:

#### Prerequisites:

* Your Pabbly account.
* MyAlice account with WhatsApp connected.

#### Step 1: Create a trigger from your Application/CRM

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/MIKU95TMf94fWBM3dpE8/Screen%20Shot%202022-10-19%20at%2011.09.05%20AM.png" alt=""><figcaption><p>Select your First Application to start the trigger</p></figcaption></figure>

Select your First Application to start the trigger. It can be from Webhook or any external application / CRM you use. Note that, to create a Customer in MyAlice WhatsApp, you need a phone number in the data received from the trigger.

#### Step 2: Create a Customer in WhatsApp

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/P6wzXJyCQeyfiRUIp5kl/Screen%20Shot%202022-10-19%20at%2011.14.55%20AM.png" alt=""><figcaption><p>Select MyAlice App to Create Action</p></figcaption></figure>

Choose MyAlice as your next app (or any stage that fits to your automation use case). Select "**Create a Customer**" event and Connect with your MyAlice account with your MyAlice API Key.

{% hint style="info" %}
You can get your MyAlice API key by going to Settings -> Team Information.
{% endhint %}

Once you're connected to MyAlice, you can create a customer in WhatsApp by mapping values from your trigger.&#x20;

## Send a WhatsApp Template Message

### **Sample scenarion:**

* Your customer has abandoned a cart in Shopify. You want to send a message to his/her WhatsApp with discount offer to complete the purchase.
* Someone signed up from your ads. You want to send him/her a WhatsApp message to welcome.

### Setting up:

#### Prerequisites:

* Your Pabbly account.
* MyAlice account with WhatsApp connected.
* Approved WhatsApp Template.

#### Step 1: Create a trigger from your Application/CRM

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/MIKU95TMf94fWBM3dpE8/Screen%20Shot%202022-10-19%20at%2011.09.05%20AM.png" alt=""><figcaption><p>Select your First Application to start the trigger</p></figcaption></figure>

Select your First Application to start the trigger. It can be from Webhook or any external application / CRM you use. Note that, to create a Customer in MyAlice WhatsApp, you need a phone number in the data received from the trigger.

#### Step 2: Create a Customer in WhatsApp (Optional)

Choose MyAlice as your next app (or any stage that fits to your automation use case). Select "**Create a Customer**" event and Connect with your MyAlice account with your MyAlice API Key.

Once you're connected to MyAlice, you can create a customer in WhatsApp by mapping values from your trigger. This part is optional, but if you create a customer you will be able to set up customer's First Name, Last Name.&#x20;

#### Step 3: Send a WhatsApp Template Message

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/HM5cEKx4knYtdQIyXYFC/Screen%20Shot%202022-10-19%20at%2011.24.08%20AM.png" alt=""><figcaption></figcaption></figure>

Choose MyAlice as your next app (or any stage that fits to your automation use case). Select "**Send WhatsApp Template Message**" event and Connect with your MyAlice account with your MyAlice API Key.

Once connected, you can select your WhatsApp Number from the dropdown list. Once you select your WhatsApp Number, you will be able to select the verified WhatsApp Template message as well. Finally, add the Customer's WhatsApp Number from data retrieved from triggers/your app.

That's it! If the customer's number is a valid WhatsApp Number, s/he will receive the WhatsApp template message once the Workflow is triggered! 🎉&#x20;

## Send a Message (any MyAlice channel)

### **Sample scenarion:**

* Your customer has provided their email address in any channel in MyAlice. You want to get additional data from your CRM with that email and send a message to that customer.

### Setting up:

#### Prerequisites:

* Your Pabbly account.
* MyAlice account with any channel connected.
* The customer has to be connected with any MyAlice channel. MyAlice UID of the Customer will be needed (it can be received with API block in MyAlice)

#### Step 1: Create a Webhook trigger

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/lyZylOgoCJnHxXHom6NN/Screen%20Shot%202022-10-19%20at%2011.32.29%20AM.png" alt=""><figcaption></figcaption></figure>

Select Webhook by Pabbly. Copy the generated webhook link.

#### Step 2: Create an API in MyAlice

Go back to your MyAlice account and create an API in MyAlice from the API tab.&#x20;

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/RWHsG4KJdls59YNqKcUk/Screen%20Shot%202022-10-19%20at%2011.34.26%20AM.png" alt=""><figcaption></figcaption></figure>

* Create a POST request with Pabbly webhook URL.
* Use it as text block \[You will find this option below in the API details, after header & body]

#### Step 3: Trigger a text block with the API

####

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/Bde1eutdF3U8p5koQSAO/Screen%20Shot%202022-10-19%20at%2011.37.59%20AM.png" alt=""><figcaption></figcaption></figure>

In your preferred automation sequence, create a text block with the API call.

{% hint style="info" %}
Type << in a text block to select the API.
{% endhint %}

#### Step 4: Trigger the API to generate Pabbly webhook data

Trigger the sequence to generate webhook data in Pabbly for further mapping. Once you generate the data, you will see there is a datapoint named "Uid" which will be needed to send the text message.

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/siYILt8yENygHdBn2Olz/Screen%20Shot%202022-10-19%20at%2011.41.52%20AM.png" alt=""><figcaption><p>Sample data captured by the Webhook once the API is triggered</p></figcaption></figure>

#### Step 5: Send a Message to the Customer

<figure><img src="https://content.gitbook.com/content/ZlunlE4rHhMzJq9M0MQx/blobs/lQTd7SCt5yTjovsIRD4N/Screen%20Shot%202022-10-19%20at%2011.46.01%20AM.png" alt=""><figcaption></figcaption></figure>

Choose MyAlice as your next app (or any stage that fits to your automation use case). Select "**Send a Message**" event and Connect with your MyAlice account with your MyAlice API Key.

Once connected, you can select the MyAlice UID from generated webhook data. You can also populate the message with data from your CRM / other application. Once done, you can send the message to the customer!


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.myalice.ai/myalice-guide-arabic/external-integration/pabbly.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
