An introduction to webhooks

Webhooks allow applications to communicate with one other automatically when an event occurs, instead of relying on periodic queries.

For example if you run an ecommerce 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 an built-in integration capability that meets your needs, or that you build one yourself. Introducing an Connect increases the flexibility of your integrations, and makes it simpler to implement and customise them.

Webhook components in your Connect system

Connect comes with a range of components. These are building blocks that enable you to create integrations between a wide range of services. There two main types of are components:

  • A connector is a specialised component designed specifially for sending and retrieving data from a specific third party service

  • Generic componements such as Webhooks and Mappers are used to action data flowing betweem two connectors, and to send a retrieve data from services that do not have a bespoke connector

Working with webhooks in your Connect

If you are using a webhook it is just one part of the whole flow. To complete the picture we need to consider Webhook Components, Webhook Services and how these work inside an integration flow.

  • 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 our platform uses Webhooks for integration flows:

Webhook scheme
  • 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 execution of steps.

Webhook components can be secured with credentials to avoid unwanted activity. See the link below for further information about credentials.