Creating a seamless integration experience with webhooks
IN THIS ARTICLE
Webhooks are a method for applications to communicate in real-time by sending automated messages when specific events occur. Here's how they work:
How webhooks function
-
Event Triggering: A webhook is initiated by an event in a source application, such as a user action (e.g., submitting a form, making a purchase, or updating a record). When such an event occurs, the application fires a message with relevant data about the event, known as a payload.
-
Sending Data: The source application sends this payload to a specified webhook URL — a unique endpoint in the receiving application. This URL acts like a phone number that the source application "calls" to deliver information about the event.
-
HTTP Request: The data is sent over the web using an HTTP request, typically POST. The receiving application processes this request and may respond with an HTTP status code (e.g.,
200 OKor404 Not Found). -
Real-Time Updates: Unlike APIs that require polling, webhooks push data instantly when an event occurs — reducing server load and transaction costs.
-
Subscription Management: Users create webhook subscriptions, specifying which events they want to receive and providing a webhook URL. This often involves an API call.
Note
We suggest setting up individual webhooks for each user. Albato will generate a unique webhook URL for each customer and send it to your endpoint. You must store these URLs to reuse them when users run their integrations.
There are two basic types of webhook implementation:
Auto-subscription (desirable type)
Here, Albato needs an API method in your SaaS to subscribe to your webhooks. Your subscription API should allow specifying events to subscribe to and accept a subscription URL.
Example: Shopify webhook subscription
If using auto-subscription, you must also provide an unsubscribe method.
Example: Shopify webhook unsubscribe
Here's how it works step by step:
- Albato subscribes to your SaaS events.
- Albato specifies an HTTPS endpoint to receive events.
- Event XYZ in your SaaS is created and a webhook id is returned.
- Your SaaS sends a webhook payload to Albato.
- Albato unsubscribes using the webhook id when the Automation is stopped.
Standard webhook requirements:
- JSON format
- Event type in the payload
- Payload containing all fields needed in integrations
See below a Shopify webhook “Customer created” example:
- Albato subscribes to your webhook

- Your webhook response with the payload

Manual subscription
If a webhook subscription API isn’t feasible, users can manually paste a webhook URL into your UI using the URL provided by Albato in the iFrame.
Note
Manual subscription is not user-friendly as it requires back-and-forth steps for setup.
You can streamline this via the SSO connection method.
Example response:

Note
If your webhooks contain custom user-specific fields, Albato can fetch them automatically via your API and insert them into user integrations, improving UX.
Did this answer your question?