Webhook Processor

Service that processes incoming webhook events from external platforms (WhatsApp, Instagram, Facebook)

Service

Overview

The Webhook Processor service handles incoming webhook events from external platforms including WhatsApp Business API, Instagram Direct Messages, and Facebook Messenger. It validates, routes, and processes these webhooks asynchronously.

View the changelog

Want to know the history of this service? View the change logs

Contact the team

Any questions? Feel free to contact the owners

Sends 1 messages

This service sends messages to downstream consumers

Receives 1 messages

This service receives messages from other services

Architecture diagram

Supported Platforms

WhatsApp

  • Processes webhooks from WhatsApp Business API
  • Handles message events, status updates, and delivery receipts
  • Uses WhatsappChatService for processing

Instagram

  • Processes webhooks from Instagram Direct Messages
  • Handles message events and status updates
  • Uses InstagramChatService for processing

Facebook Messenger

  • Processes webhooks from Facebook Messenger
  • Handles message events and page events
  • Uses MessengerChatService for processing

Processing Flow

How Webhook Processor Works

  1. Receive Webhook

    Webhook event is received from the Webhook Queue

  2. Validate Payload

    Webhook payload is validated against platform-specific schemas

  3. Route by Type

    Webhook is routed to the appropriate platform handler based on type

  4. Process Event

    Platform-specific service processes the webhook event

  5. Queue Message

    If the webhook contains a message, it’s queued to WhatsApp Message Queue for processing

Error Handling

The processor implements batch processing with individual message failure handling:

  • Failed messages are reported individually
  • Successful messages continue processing
  • Failed messages are retried up to 3 times before moving to DLQ
Event-driven architecture documentation: Impulsell