> For the complete documentation index, see [llms.txt](https://whatcrm.gitbook.io/whatcrm-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://whatcrm.gitbook.io/whatcrm-docs/english/integrations-products/pipedrive/automated-whatsapp-messaging-with-pipedrive-triggers.md).

# Automated WhatsApp Messaging with Pipedrive Triggers

**Step 1: Create a Webhook for Automated WhatsApp Messaging**

1. **Open Webhooks Menu and Add a New Webhook**

* In the Pipedrive interface, click on the “More” section (three dots) on the left side of the screen.
* Select “Automations” and then choose “Webhooks.”
* In the Webhooks menu, select the “Automated Webhooks” subsection.
* Click the “+ Webhook” button in the top-right corner.
* Choose “Add Automated Webhook.”

  <figure><img src="/files/u43CEKFmijOPL6QuxNd3" alt=""><figcaption></figcaption></figure>

2. **Configure Webhook Details:**

* **Webhook Name:** Enter a name for the webhook (e.g., “Automated WhatsApp Messaging”). You can name it as desired for better identification.
* **Endpoint URL:** Copy the URL from your connection settings by clicking “Copy a Webhook URL.” Paste this URL into the “Endpoint URL” field.
* Click “Save” to complete the webhook setup.

  <figure><img src="/files/GlASIySqXFcXZdApZ7tT" alt=""><figcaption></figcaption></figure>

**Step 2: Create an Automation**

1. **Add a New Automation:**

* Return to the “Automations” section.
* Click the “+ Automation” button to create a new automation.

  <figure><img src="/files/LscHse16G4FS4VcIdBkH" alt=""><figcaption></figcaption></figure>

2. **Set Up Trigger Event:**

* Select the desired triggering event. For example, we want to send a message when a new deal is created in a certain funnel and stage:
* Select “Deal” as the trigger.

  <figure><img src="/files/ESZjutB0bti9s9qdfghg" alt=""><figcaption></figcaption></figure>
* Set the Event to “Added.”
* Click “Apply Trigger.”

  <figure><img src="/files/0kRbAhLiECOFJW9uFtOA" alt=""><figcaption></figcaption></figure>

3. **Configure Trigger Conditions:**

* Set the conditions for the trigger, such as choosing the pipeline and stage where the deal will be created.
* Adjust the parameters as needed and save the conditions.

  <figure><img src="/files/DZ0vYzZL09Y20fzMysEc" alt=""><figcaption></figcaption></figure>

**Step 3: Add Action to Send Webhook Request**

1. **Add an Action:**

* Click the “+” button and select:

* Action: “Webhook”

  <figure><img src="/files/DheuDktyz8dGoTP4N5yO" alt=""><figcaption></figcaption></figure>

* Action Type: “Send Webhook Request”

* Click “Next”&#x20;

  <figure><img src="/files/H5l116dSFCdRVFXuVrEF" alt=""><figcaption></figcaption></figure>

* Keep these fields as default and Click “Next” <br>

  <figure><img src="/files/MqC7iqZlXzY0gvwjZDgg" alt=""><figcaption></figcaption></figure>

2. **Configure Webhook Action:**

* **Webhook:** From the list, choose the webhook you created in Step 1 (e.g., “Automated WhatsApp Messaging”).
* **Method:** Select “POST” from the list.
* Body:
* Add entry&#x20;
* For the “Key” field, enter “**phone\_number**”
* For the “Value” field, select “**Deal contact person phone**” (**Note:** Ensure that the entity selected in the “Value” field corresponds with the trigger (e.g., lead with lead, deal with deal). The value should be the client’s phone number.
* For the second  “Key” field, enter **message**.
* For the “Value” field, paste the text of your automated message.

  <figure><img src="/files/B2gEcaexfAjLt2Gx7oAl" alt=""><figcaption></figcaption></figure>

  **(Optional) Add Attachment:**
* If you need to send a message with an attachment (e.g., an image or document), click “+ Add Entry.” <br>

  <figure><img src="/files/NezVNeP4R41ALkDDaA0A" alt=""><figcaption></figcaption></figure>
* Enter **file\_url** in the “Key” field.
* Paste the direct URL of the document or image in the “Value” field.
* Click “Save” to finalize the action.<br>

  <figure><img src="/files/5QIdPoi3CjlHEfzkGqRE" alt=""><figcaption></figcaption></figure>

**Sending Multiple Attachments:**

* In the “Value” field, enclose all file URLs in square brackets `[]` and wrap each URL in double quotes `""`.
* Separate each URL with a comma.
* Ensure the field looks like this:

**Example:**\
`["https://example.com/file1.jpg", "https://example.com/file2.jpg", "https://example.com/file3.jpg"]`

{% hint style="warning" %}
Do not add multiple `file_url` entries. All files must be included in a single `file_url` field, as JSON standards do not allow duplicate keys. Only the last value will be processed if multiple `file_url` entries are added.
{% endhint %}

* Click “Save” to finalize the action.

{% hint style="info" %}
**Important Note:**\
While multiple files can be sent in one automation, WhatsApp will deliver each file as a separate message. Unfortunately, WhatsApp does not support sending multiple files as a single message.
{% endhint %}

✨ **How to Add Line Breaks in a Message?**

To insert a line break in your message, use the \n symbol where you want the line to break.

📌 **Example:**&#x20;

`Hello, {Lead contact person name} !\nThank you for reaching out to us.`

<figure><img src="/files/hGIm4jw9ajzNZdbAGORX" alt=""><figcaption></figcaption></figure>

This will appear as:

Hello, John!\
Thank you for reaching out to us.

**🔹 Additional Tip for Line Breaks:**

* If you use `\n\n`, it will create a double line break (move the text down by two lines).

{% hint style="warning" %}
⚠️ **Note:** The line break functionality is provided by our integration and is not natively supported in the CRM.
{% endhint %}

🤝 **How to Personalize Messages?**

You can make your messages more personal by inserting dynamic values from the deal or contact fields.\
💡 **Steps to personalize a message:**

1. Click the ➕ button on the right side of the message input field.<br>

   <figure><img src="/files/9mYcRFVlTIU4oTT7XFjx" alt=""><figcaption></figcaption></figure>
2. Select the desired value, such as **Lead contact person name**.

📌 **Example:**

`Hello, {Lead contact person name}! Your order is being processed. 🚀`

This will appear as:

`Hello, John! Your order is being processed. 🚀`
