โ AI App Building (No-Code & Low-Code)
Day 8 of 14
Webhook-Based Workflows
How Webhooks Work and Why They Matter
A webhook is an HTTP callback โ when something happens in System A, it sends an HTTP POST to a URL you've configured in System B. This is the foundation of event-driven architecture and the mechanism behind almost every modern integration.
Examples relevant to your stack: Stripe sends a webhook when a subscription is created, updated, or cancelled โ your app listens for these events and updates the customer's access. Apple's App Store sends server-to-server notifications (S2S) for subscription events โ same pattern. A Dormakaba door access event could be a webhook to your app. GitHub sends webhooks on pull requests โ your CI/CD pipeline starts.
Webhook receivers must be: fast (respond within 5 seconds or the sender retries), idempotent (if the same event arrives twice, processing it twice doesn't cause problems), and authenticated (verify the webhook signature to prevent spoofed events). Every major webhook provider uses HMAC signature verification โ validate the signature on every incoming webhook before processing it.
Building a Reliable Webhook Pipeline
The most common mistake with webhooks is processing them synchronously in the HTTP handler โ you acknowledge the webhook, then do the work, and if the work takes too long, the sender times out and retries, creating duplicate processing.
The correct pattern: (1) Receive webhook and verify signature (< 100ms), (2) Save the raw event to a queue or database immediately, (3) Return 200 immediately, (4) Process the event asynchronously in the background. This ensures no events are lost and the sender never sees timeouts.
For Darkice Interactive's integration with Gliderol or Dormakaba: an access control event (door opened, access denied, battery low) comes via webhook. Your receiver saves it to a Supabase table, returns 200, and then a Supabase database webhook triggers an n8n workflow that: (a) classifies the event type, (b) checks if it's alertable, (c) notifies the relevant contacts via WhatsApp/email if needed. This entire pipeline handles hundreds of events per second with no server management and costs cents per day.
โก Today's Action
Set up a webhook test endpoint using webhook.site (free) and trigger a real webhook from one of your existing systems (Stripe, GitHub, Apple S2S). Inspect the payload structure. This is the data you have to work with โ understanding its shape is the prerequisite for any integration.
๐ก Pro Tip
Use Svix or Hookdeck for webhook infrastructure management โ they add retries, event logging, fanout to multiple endpoints, and signature verification. This is worth the $20โ$50/month for any production webhook infrastructure.