How to use Zapier Webhooks

Modified on Wed, 3 Jan at 10:02 AM

Looking to transfer information from a different application you're using? Webhooks are often a top pick for many users due to their enhanced capability in transmitting data from one location to another. If our robust Workflow Automations don't quite meet your specific task needs, a webhook might just be the solution you need - or at least it can bring you a step closer!


This article will guide you through the process of utilizing webhooks.


**Understanding Webhooks:**

Webhooks, or HTTPS requests, are fundamental in online interactions. They enable platforms like ours to connect with services such as Stripe, Twilio, Mailgun, Zapier, and more. With webhooks, you can bring your business requirements to life by facilitating seamless communication between applications.


**Why Webhooks Matter:**

Webhooks are essential for linking different applications, enabling them to interact and execute unique tasks. This section will explain common terms associated with using webhooks.


**Key Terms Explained:**

- **HTTPS Request:** This is the technical term for a webhook request. HTTP is the main method for transmitting data between websites and web browsers, and HTTPS is its secure version, encrypting data during transfer.

- **Triggering Event:** This is a specific event that prompts an app to send information to another app’s Webhook URL.

- **Webhook URL:** This unique URL is created by the app receiving a webhook request and acts like a specific address or phone number for that app.

- **Payload:** This refers to the comprehensive information sent from one app to another.

- **Query Params:** Similar to UTM Parameters, these are used in a Webhook URL to structure information in a way that the receiving app can efficiently process the payload.

- **Mapping:** This process involves taking the received payload and assigning it to the appropriate fields in the receiving application. For instance, mapping contact details from the payload to the corresponding fields in the Workflow.


**How Webhooks Function:**

Webhooks typically connect applications, necessitating a triggering event that signals one app to send data to another. For instance, a transaction in Stripe can trigger a payload to be sent to our system, allowing us to then use this data for specific tasks.


**Implementing Webhooks:**

To deploy webhooks, one application needs to provide a Webhook URL, which is akin to a unique address or phone number. This URL is used to initiate the request to the intended application, similar to how a specific phone number directs a call to a particular business or department.


How to Use Webhooks

There are two ways to utilize Webhooks in. In potentially over-simplistic terms, there are “Catching” and “Sending” Webhooks.


Two ways to use Webhooks:

(A) Inbound Webhook

“Catching” an Inbound Webhook Request in a Workflow Trigger.

As the names suggest “Catching” is all about receiving or “catching” a webhook request made to the Webhook URL. In our system, this is a Workflow Trigger called an “Inbound Webhook.”

(B) Outbound Webhook

            “Sending” an Outbound Webhook Request with a Workflow Action.

In contrast to the above “Catching” motion… “Sending” is when you make a request to an external Webhook URL. In our system, this is a Workflow Action called “Webhook.”


Below, we will walk through each scenario and how to perform it in our system.


Order: Trigger, Action, Trigger, Action

Another helpful way to learn about webhooks is to see the pattern in the order of operations that occur. Regardless of an inbound or outbound webhook we generally have a Trigger and action in one app that then sends information to another app. In this second app, there is another trigger and then the last action. 


Hence the title... Order: "trigger, action, trigger, action." Which denotes the flow of webhooks that are utilized by both apps. Each has a single trigger and action that causes a connection between the two.


You will notice this same pattern in the examples below with the first app having a trigger and action --> which sends a payload to the next app that is an inbound webhook trigger followed by another action.






(A) Inbound Webhook 

“Catching” an Inbound Webhook Request in an Apex Workflow Trigger.


In this scenario, we want Apex to catch information from an external app. The external app will send the Payload to the Apex Webhook URL provided when we create a Workflow Trigger - Inbound Webhook. For example, our use case above is an inbound webhook request where we send information from an external purchase into Apex to be used to perform unique tasks for those specific contacts who purchased the product.


1. Enable Inbound Webhooks

If you haven’t already, you will need to enable “LC Premium Triggers & Actions” in order to proceed. To catch an inbound request, we need an “Inbound Webhook” which is only available on LC Premium Triggers & Actions.


Did you know... Most Apex System Users like to utilize integration and automation software like Zapier, Make, or Pabbly. They come with easier-to-use triggers and actions for many applications you may be using already. In many cases, it is simpler and more powerful to utilize one of these platforms in combination with Apex Workflows. Learn more about Zapier, Make, and Pabbly here.



2. Create the Webhook URL in an Apex Workflow Trigger

Now we need to open our Apex Workflow and create the Webhook URL. Open/Create your workflow then select the “Inbound Webhooks” as the Workflow trigger. An Apex Webhook URL will be created. Copy this Webhook URL to be used in the next step.

 



3. In the External App, Create a Webhook Action Step

In your external app of choice, you will need to create a trigger and webhook action step. For example: In Zapier, you can use a “Payment” trigger to fire when a payment is made. We can use the  “Webhooks By Zapier” to POST the payload to the Apex Webhook URL. Paste the Apex Webhook URL from step two into the Zapier Action Step.




4. Send a Test

Now we need to send a sample payload to our Apex Webhook URL in order to proceed. Within your external app, Zapier in this example, go to the end of the step and hit “Test Step.” For sending a test payload in Apex for an external app, please consult your external app documentation and Support. In Apex, continue to wait and refresh the “Mapping Reference” Section until you have a “Mapping Reference” in Apex available to select.




5. Create/Update Contact

For Apex, we require a contact for every single Automation to run. This is why the “Create/Update Contact” will open automatically. You can also use the "Find Contact" Action to locate a contact based on a custom field or another value. It is required to have this filled out, otherwise, this will NOT work and the Workflow will break. So at minimum, create/update the phone or email from the payload of the inbound webhook or find a contact based on a custom field or such. A contact found or matched is required in order for this to work.



Now you are done! You have the information in Apex to map and use as you like within the Workflow.


Mapping Information in Apex

Now you can use this information within "Custom Values" > "Inbound Webhook Trigger" to map the information from the payload into the correct fields or actions in Apex. So when it runs, the right information from the Inbound WEbhook will populate in the correct place in Apex.




Want to learn more about Zapier and how to use it? Getting Started with Zapier.






(B) Outbound Webhook

“Sending” an Outbound Webhook Request with an Apex Workflow Action.


In this scenario, we are sending information from an Apex Workflow Action into an external app. For example, when someone fills out a form in Apex, we want this contact information to go into an External App so we can have the information about the contact there. 




1. Ensure that the External application allows for Receiving of Webhook Data

For some external applications, receiving data from a webhook is a premium Feature. Other apps just simply need to have the trigger enabled. You will need to consult the documentation for the application and upgrade if needed. In Zapier, which we will use in this example, you must be on a paid account to use inbound Webhooks (known as Catchhooks) by Zapier.


Not Seeing Webhooks in Your External App?

In some cases, webhooks may not be available within many External Apps for you to use. In these cases, you can check out automation/integration software like Zapier, Pabbly, or Make to bridge the information gap between your apps. Learn more about Zapier, Make, and Pabbly here.



2. Create a Webhook URL in the External App

Within your External App create a trigger for the Inbound Webhook. After creating this Trigger, you should have a Webhook URL generated to be used in later steps. For example: In Zapier, you can use the “Webhooks By Zapier” Trigger with the “Catch Hook” Event. Continue to the Trigger step. Copy the Webhook URL generated from the External App.



3. Add the External Webhook URL to your Apex Workflow Action

Now we can add the External Webhook URL to an Apex Workflow Action. Create or open your Apex Workflow. Add the External Webhook URL to an Apex Workflow Action. Save the workflow and publish it.



4. Send a Test From Apex to the External App

Now we need some sample information from Apex to the External App. To do this, we need to trigger the workflow. For example, we can make a Test purchase so the Workflow Trigger will fire this information to Zapier. It is best to perform the workflow trigger as if it is a live-action of what will happen. This is because you want all of the example data provided in the payload when you go to use it in the External App.


Continue testing until you have successfully sent the information to the External app and it has been received by the External App.



Well done! Now every time the Apex Workflow triggers, it will send this information to your External App for usage. Within Zapier, you can now use this information to populate Spreadsheets or perform other unique tasks.


Mapping Information in Zapier

Select a field to update on your Zapier action, and then a popup will show an "Insert Data" which will allow you to select a placeholder (or Custom Value as it is known in Apex) within the Zapier action to map the information in the payload. This will stamp the data you want during every run of this webhook so the correct inforamtion from Apex updates the correct places in Zapier or your other third party app. 



Want to learn more about Zapier and how to use it? Getting Started with Zapier.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article