Webhooks and… pizza? 🍕
Let me explain!
Imagine ordering a pizza.
Do you keep asking the waiter if it’s ready? You could!
That approach is called “polling”?
Annoying for both parties and not so efficient.
Eventually, you will get your pizza.
Normally you’d order your pizza, then relax.
You’d wait for the pizza to be delivered straight to your table when it is ready.
This is how webhooks work.
In this analogy:
- The pizza represents the message or data being sent via the webhook.
- The waiter is the webhook producer (or provider or sender or emitter).
- The customer is the webhook receiver (or consumer or listener).
Let’s keep going. The pizza is ready!
The chef cooked an amazing, Italian-style prosciutto e funghi (ham and mushrooms) pizza.
Fragrant, delicious, crunchy and soft at the same time.
The waiter picks it up, walks to the right table and delivers it to the customer.
“Here is your ham and mushroom pizza”, says the waiter.
“Yes, that’s mine! Thank you very much”, you reply.
“You are very welcome. Enjoy!” the waiter says, and leaves.
This “acknowledgment” confirms that the pizza (message) has been delivered successfully.
That’s it. That is how webhooks work.
A platform (the restaurant) has a webhook producer (the waiter) that sends a message (the pizza) to a webhook receiver (the customer).
But wait, there is more!
We just covered the “happy path” - a smooth, successful delivery. But not all webhooks work the same way.
In some cases, there is no acknowledgement.
If the customer is not there (system down) the pizza is left on the table, eventually getting cold and thrown out (message lost forever).
In some other cases, the waiter might even try to re-deliver the same pizza a few times at increasing intervals, before giving up (retries with exponential back off).
In other scenarios, the waiter might double-check the receipt (authentication) before delivering the pizza.
Some customers might even ask the waiter to confirm the ingredients with the chef (to verify the message’s authenticity).
Every restaurant and customer is different, just like every webhook implementation and integration.
Knowing how to handle different situations is crucial!
PS - Everything has something to do with pizza! 🍕
Tray.ai
n8n
Celigo
Relay.app
Make
Workato
I am Enrico 👋 and I improve B2B businesses with tech.
I also love making tasty Italian pizza!
What can I help you with, today?