Webhooks
Webhooks allow applications to communicate with one another automatically when an event occurs, instead of relying on periodic queries.
For example, if you run an e-commerce site using PayPal, your accounting system may be updated when a customer pays you. In this simple scenario, a webhook on the accounting system (the receiver) is receiving data from PayPal (the sender) based on the creation of a new transaction in your account (the trigger). This direct integration requires that your accounting system and PayPal come with a built-in integration capability that meets your needs, or that you build one yourself.
About webhook components
Webhook components are building blocks that enable you to create integrations between a wide range of services. There two main types:
-
A connector is a specialized component designed specifically for sending and retrieving data from a specific third-party service.
-
Generic components such as Webhooks and Mappers are used to deal with data flowing between two connectors, and to send and retrieve data from services that do not have a bespoke connector.
Working with webhooks
Webhooks are just one part of an entire flow. To achieve the intended goal we must consider Webhook components, Webhook services, and how these work inside an integration flow.
-
The Webhook component is a component that allows the flow to receive data from external triggers. You can use the Webhook component as the initial trigger of the flow, or in the middle, as an intermediate step.
-
Webhook Service is a microservice that handles Webhook components work within the flows. It takes the requests and assigns them by ID to their corresponding flows. The Webhook Service sends the requests into a queue, where they are processed and delivered to the flows.
Webhook flows
A Webhook integration flow is a flow that uses a Webhook component as a trigger. It means that the actions get started by an external input to the Webhook URL.
The following diagram shows how webhooks are used for integration flows:
-
An external HTTP request in JSON or XML format, a list of properties, or a file reaches a Webhook component’s URL exposed by a Webhook Service.
-
The Webhook Service differentiates the requests by flow ID and sends them to the platform for queueing.
-
The queue of requests is then processed and sent to the corresponding Webhook flows.
-
As a running flow gets its request, it initiates the execution of steps.
How to obtain a flow’s webhook URL
After a flow is published for the first time, the webhook URL can be found under the Webhook heading at the top of the flow’s main screen:
Look for the URL with the following pattern, (alternatively, use the appropriate version to derive the URL):
- US tenant
-
https://in.connect.squiz.cloud/hook/{FLOW_ID}
- AU tenant
-
https://in.au.connect.squiz.cloud/hook/{FLOW_ID}
The URL does not appear if the flow has not previously been published or is currently being edited. Publishing the flow (by clicking the Publish Draft button) will reveal the URL in both of these scenarios. |
Webhook components can be secured with credentials to avoid unwanted activity. See the link below for further information about credentials.