How to use webhooks with Zapier
If you are not a developer, many apps like Zapier or Make can connect the Unit21 app to thousands of apps like Google Sheets, Asana and more.
For example, when someone assigns you a Unit21 alert or case to work on, you can use Zapier to automatically generate an Asana task for the day.
Another example could be using Zapier to automatically generate a report in Google Sheets when a case is closed.
There are thousands of possibilities to automate your workflow. Let's start with an example.
Unit21 has no relationship with any of the tools mentioned in this example.
Please note that Zapier webhooks require a Zapier paid upgrade. There is a free 14 day trial at the time of this writing.
In this example, an email will be sent to the compliance team manager when an alert has over 1000 hits to ask him/her to review the rule that generated the alert.
First, create a Zapier account by going to: https://zapier.com/ and Getting started for free.
![Screen Shot 2022-12-07 at 8.26.03 PM.png 2726](https://files.readme.io/1da9a53-Screen_Shot_2022-12-07_at_8.26.03_PM.png)
To connect Zapier to Unit21, you'll make a new Zap—Zapier's automated app workflows—and choose Webhooks by Zapier as the trigger app.
![Screen Shot 2022-12-07 at 8.28.26 PM.png 2830](https://files.readme.io/33a2832-Screen_Shot_2022-12-07_at_8.28.26_PM.png)
Select Catch Hook, which can receive a GET, POST, or PUT request from another app. Zapier will give you a unique webhooks URL—copy that, so you can use it in the next steps for Unit12's webhooks URL setting.
![Screen Shot 2022-12-07 at 8.29.47 PM.png 2830](https://files.readme.io/a0aebb5-Screen_Shot_2022-12-07_at_8.29.47_PM.png)
![Screen Shot 2022-12-07 at 8.30.20 PM.png 2830](https://files.readme.io/046ecca-Screen_Shot_2022-12-07_at_8.30.20_PM.png)
GET requests ask the server for data. POST requests send data to a computer. PUSH requests ask the server for specific data, typically to update it.
![Screen Shot 2022-12-07 at 8.30.25 PM.png 2826](https://files.readme.io/6261f36-Screen_Shot_2022-12-07_at_8.30.25_PM.png)
![Screen Shot 2022-12-07 at 8.30.39 PM.png 2830](https://files.readme.io/cb7036b-Screen_Shot_2022-12-07_at_8.30.39_PM.png)
Click Test Trigger:
![Screen Shot 2022-12-07 at 8.41.18 PM.png 3098](https://files.readme.io/c361de2-Screen_Shot_2022-12-07_at_8.41.18_PM.png)
Ok, Zapier is now waiting for webhook messages from Unit21. And now that we have the URL from Zapier, let's head back to the Unit21 Dashboard.
Head over to Workflows > Webhooks in the Dashboard:
![Screen Shot 2022-12-07 at 8.35.17 PM.png 3070](https://files.readme.io/7ac74d8-Screen_Shot_2022-12-07_at_8.35.17_PM.png)
Select + Create webhook and enter the Zapier URL and the Alert generation limit reached action:
![Screen Shot 2022-12-07 at 8.37.04 PM.png 3070](https://files.readme.io/689e5ca-Screen_Shot_2022-12-07_at_8.37.04_PM.png)
Select add endpoint:
![Screen Shot 2022-12-07 at 8.38.00 PM.png 3070](https://files.readme.io/3181e1a-Screen_Shot_2022-12-07_at_8.38.00_PM.png)
Click the Send Test button to test the webhook:
![Screen Shot 2022-12-07 at 8.43.50 PM.png 3098](https://files.readme.io/405a634-Screen_Shot_2022-12-07_at_8.43.50_PM.png)
Go back to the Zapier window, you'll see data from the webhook listed in Zapier. Make sure you click Test trigger again if it doesn't appear:
![Screen Shot 2022-12-07 at 8.44.49 PM.png 3098](https://files.readme.io/14c3907-Screen_Shot_2022-12-07_at_8.44.49_PM.png)
The test worked!
The test webhook doesn't have any data in it so nothing will appear in the querystring. Typically other Unit21 webhook messages have a lot of data in them which Zapier will show you.
Now that you have data from Unit21, click Continue.
Select the action app—the app you want to send data to. You'll see form fields to add data to that app.
![Screen Shot 2022-12-07 at 8.47.44 PM.png 3098](https://files.readme.io/c9be83e-Screen_Shot_2022-12-07_at_8.47.44_PM.png)
In this case, we select Gmail:
Follow the prompt in Zapier to connect your Gmail account.
![Screen Shot 2022-12-07 at 8.48.34 PM.png 3098](https://files.readme.io/1913922-Screen_Shot_2022-12-07_at_8.48.34_PM.png)
Then select the Send email action:
![Screen Shot 2022-12-07 at 8.51.26 PM.png 3098](https://files.readme.io/a48c895-Screen_Shot_2022-12-07_at_8.51.26_PM.png)
Click Continue.
Select the Gmail account that you previously synced from the dropdown:
![Screen Shot 2022-12-07 at 8.53.52 PM.png 2972](https://files.readme.io/2d36ea8-Screen_Shot_2022-12-07_at_8.53.52_PM.png)
Click Continue.
Now we setup Zapier to email Laura, the manager, when an Alert has hit a limit to double check the rule and make sure it doesn't need to be adjusted:
![Screen Shot 2022-12-07 at 9.02.25 PM.png 2182](https://files.readme.io/6d52dde-Screen_Shot_2022-12-07_at_9.02.25_PM.png)
Click Continue.
Review the actions that Zapier will take when it receives the Unit21 webhook once last time:
![Screen Shot 2022-12-07 at 9.05.47 PM.png 2932](https://files.readme.io/32d268f-Screen_Shot_2022-12-07_at_9.05.47_PM.png)
Test your Zap by clicking Test Action:
![Screen Shot 2022-12-07 at 9.07.09 PM.png 2932](https://files.readme.io/e30b5b2-Screen_Shot_2022-12-07_at_9.07.09_PM.png)
The test email is received:
![Screen Shot 2022-12-07 at 9.08.07 PM.png 2412](https://files.readme.io/d579e9f-Screen_Shot_2022-12-07_at_9.08.07_PM.png)
Your Zap is now ready to use. Click Publish Zap:
![Screen Shot 2022-12-07 at 9.10.04 PM.png 2932](https://files.readme.io/2f38eb8-Screen_Shot_2022-12-07_at_9.10.04_PM.png)
Now the next time your Unit21 sends an Alert Limit message, Zapier will automatically email the manager.
A few days later:
![Screen Shot 2022-12-07 at 9.13.44 PM.png 2412](https://files.readme.io/66760e6-Screen_Shot_2022-12-07_at_9.13.44_PM.png)
Updated 8 months ago