> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Use MoEngage as a trigger

> Use MoEngage Connector Campaigns as a Zapier trigger to fire workflows on user uninstalls, custom events, and other behavior signals across 5,000+ Zapier apps.

## Introduction

[Zapier](https://zapier.com/) is an online platform that helps you automate workflows by connecting your apps and services you use. Using the MoEngage and Zapier integration, you can create custom workflow automations for more than 5,000+ apps on Zapier.

With MoEngage's [Connector Campaigns](https://www.moengage.com/docs/user-guide/campaigns-and-channels/connectors/create/create-a-connector-campaign), you can use MoEngage to trigger your Zapier workflows for multitude of purposes.

## Use cases

Some ideas to get you started:

1. Post Slack message for each uninstall event in MoEngage.
2. When a particular event occurs in MoEngage, add data to a Google Sheet.
3. Create a new ticket in Zendesk for each user when they perform a custom event in MoEngage.
4. When a user performs an event in MoEngage, add them to a cohort in MoEngage.

<Info>
  **Prerequisites**

  Ensure you have access to your Zapier account and have connected it to your MoEngage account. You can [follow the steps here to connect Zapier to MoEngage](/docs/partner-guide/data-and-analytics/workflow-automation/zapier/overview#connecting-zapier-to-moengage).
</Info>

## Integration

The use case takes advantage of MoEngage [Connector Campaigns](https://www.moengage.com/docs/user-guide/campaigns-and-channels/connectors/create/create-a-connector-campaign). For this tutorial, we will pick up Use Case #1: Post Slack message for each uninstall in MoEngage. On your [Zapier Dashboard](https://zapier.com/app/dashboard), click on "+ Create Zap" on the top-left corner.

### Step 1: Select Webhook by Zapier as the trigger app

For the trigger, type "Webhook by Zapier" and select it. This will be the trigger that will start your zap.

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7926866117268.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=0bdf57c0af306fc0a78787ce0005d443" alt="Selecting Webhook by Zapier as the trigger app" width="2880" height="1576" data-path="images/partner_7926866117268.png" />

### Step 2: Setup the trigger app

1. Select the event from the dropdown: "Catch Hook". Click continue.
2. Under the "Set up trigger" step, leave the "Pick off a Child Key" blank. Click continue.
3. You will now be shown your unique Webhook URL.

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7926954721812.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=617152976c1429487afa3f7c335b42a8" alt="Unique Webhook URL displayed in Zapier setup" width="2880" height="1576" data-path="images/partner_7926954721812.png" />

4. Keep this URL handy. You will need this to setup Connector Campaigns.

### Step 3: Setup Connector Campaign in MoEngage

1. Navigate to MoEngage Dashboard.

2. Use any one of the following options:
   1. On the **All Campaigns** page, click **Create Campaign**. The Create Campaign page is displayed.

      <img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_4491322708756.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=b4bf1c4b26d4d224f638b751bb63ed1d" alt="Create Campaign button on the All Campaigns page right navigation" width="1914" height="946" data-path="images/partner_4491322708756.png" />

   2. Click **Create New > Campaign**. The Create Campaign page is displayed.

      <img src="https://mintcdn.com/moengage/11KR3mwxT6FlowrU/images/partner_4491307125908.png?fit=max&auto=format&n=11KR3mwxT6FlowrU&q=85&s=aca2d791215ffdd360df054ed0e59504" alt="Create New Campaign option from the left navigation" width="1920" height="947" data-path="images/partner_4491307125908.png" />

3. Click **Custom** under Connectors.

4. For the campaign delivery types, choose "Event-Triggered".
   * For more information about delivery types, refer to [Delivery Types](https://www.moengage.com/docs/user-guide/campaigns-and-channels/getting-started/introduction/delivery-types-moengage-channels).

5. On the next screen, give your Campaign a name, and select the Criteria as "Device Uninstall".

6. For trigger, choose "immediately".

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927058977300.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=413de57ecaf69c43c22e101a593fe73e" alt="Connector campaign setup with Device Uninstall criteria" width="2468" height="850" data-path="images/partner_7927058977300.png" />

7. For audience, let us choose "All users" for this use case. Click "next" when satisfied.
8. On the content screen, we will define our payload and webhook URL we got from the previous step.
9. Choose method as "POST" (know more about [Webhooks on Zapier](https://zapier.com/help/create/code-webhooks/trigger-zaps-from-webhooks)).
10. Enter the webhook URL you copied earlier.
11. Define the headers and parameters as per your requirements. For this use case, we will just define our payload body. (You can type @ to insert personalised values as well.)

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927086198932.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=3f1a321643eac9bdf8955af27487295f" alt="Connector campaign content step showing method, webhook URL, and payload" width="2088" height="1458" data-path="images/partner_7927086198932.png" />

12. Now you need to test this webhook. Scroll down and enter a test user's data and click on "test".
13. You should see a new modal saying the test was successful.

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927131912084.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=15d8a003828ccc250b301b4945b747c1" alt="Successful webhook test confirmation modal" width="1220" height="466" data-path="images/partner_7927131912084.png" />

14. Now go back to the Zapier editor.

### Step 4: Test webhook setup on Zapier

1. Click on "Test Trigger" to pull in the test campaign you just sent in MoEngage.
2. Once you are satisfied with this data, you can publish the Connector Campaign on MoEngage.
3. Back in Zapier, click continue to add the next step in your workflow.

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927184596756.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=6e6d8bda1f03c48c5e5e1a2e27be7925" alt="Test trigger result in Zapier showing MoEngage payload" width="1810" height="1132" data-path="images/partner_7927184596756.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927154337940.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=752776852a2da0e06d0fd190efa10231" alt="Test trigger details with parsed fields" width="1810" height="924" data-path="images/partner_7927154337940.png" />

### Step 5: Add Slack as the action app

Click on "+" to add a new step. Then, search for "Slack" from the apps and select it.

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927158176660.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=b4aed9c4e457f69af27218425f894793" alt="Adding Slack as the action app in Zapier" width="1804" height="1304" data-path="images/partner_7927158176660.png" />

### Step 6: Setup Slack action

1. From the event dropdown, select: "Send Direct Message". Click continue.
2. Now you need to connect to Slack. Once you are done, choose the connected account from the dropdown and click continue.
3. In the next step "Set up action", you will see a form for you to either fill-in or map from the previous step. We will just fill in the values for "To Username" and "Message Text". Make sure to select "Yes" for "Send as a bot?".

You can also map data from previous step:

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927271509908.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=0669edd794003bbbdac30fbb5cd7936b" alt="Mapping data from previous step into Slack action fields" width="1804" height="570" data-path="images/partner_7927271509908.png" />

The form could look like this:

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927482584980.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=63d0f85fae4cd0fe687662a942ea26b0" alt="Slack action setup form filled with username and message text" width="1804" height="1354" data-path="images/partner_7927482584980.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927343636756.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=b0e41dfb0644c0b43a3b47ad7b4acd4a" alt="Continuation of Slack action setup with bot toggle" width="1804" height="1394" data-path="images/partner_7927343636756.png" />

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927343615508.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=d793d8b66f9a47e6590792478112d8c8" alt="Final Slack action configuration preview" width="1804" height="896" data-path="images/partner_7927343615508.png" />

4. You will now be presented with an option to test this setup.

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927379699732.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=a4e149e3bddaefb92b57af5713497ec3" alt="Option to test Slack action setup" width="1804" height="1468" data-path="images/partner_7927379699732.png" />

5. Click on "Test & continue" to test this setup.
6. If the API call was successful, you should see a "success" return.

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927375976980.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=87ffec226835f126a596056129b4aae9" alt="Successful Slack action test response" width="1804" height="1498" data-path="images/partner_7927375976980.png" />

You can also verify this in Slack. You should now see a new message there.

<img src="https://mintcdn.com/moengage/skVB8Wto_b8UCyhm/images/partner_7927447035412.png?fit=max&auto=format&n=skVB8Wto_b8UCyhm&q=85&s=6dc4cd03d367611430afbaadc37e4c3c" alt="New Slack message verified in the Slack workspace" width="1420" height="1050" data-path="images/partner_7927447035412.png" />

7. Once you are satisfied that everything works, click on "Publish Zap" and it will run every time a new uninstall takes place. You will be notified on Slack.
