See llms.txt for all machine-readable content.

Back to Templates

Route multi-channel approval requests via Slack, Teams, WhatsApp and email

Quick overview

This workflow exposes a webhook-based approval gateway that sends approval requests to Slack, Microsoft Teams, and WhatsApp via webhooks/APIs, collects approve/reject responses through resume links, applies a configurable decision policy with timeout/escalation, and returns the final verdict plus an audit trail to the caller.

How it works

  1. Receives a POST request on the /approval-gateway webhook with approval details (subject, description, approvers, channels, policy, and timeouts).
  2. Validates the input, creates an approval session, and generates an HMAC-signed token used to protect approve/reject actions.
  3. Builds channel-specific messages for Slack (Block Kit), Microsoft Teams (Adaptive Card), WhatsApp Cloud API (interactive buttons), and an email-friendly HTML payload with approve/reject links.
  4. Sends the approval request to Slack and Microsoft Teams via incoming webhooks and to WhatsApp via the WhatsApp Cloud API.
  5. Waits for approvers to respond through the workflow resume URL or for the timeout path to trigger escalation.
  6. Verifies the signed token, aggregates decisions using the selected policy (any/all/majority/first), finalizes the status, and returns the final decision and full audit object in the webhook response.

Setup

  1. Replace the signing secret in the workflow’s configuration with a long, random value to secure the HMAC-signed approval tokens.
  2. Create and paste your Slack Incoming Webhook URL and Microsoft Teams Incoming Webhook URL into the workflow configuration (or node URL fields).
  3. Configure WhatsApp Cloud API access by setting the Graph API messages endpoint (phone number ID) and a permanent access token in the workflow configuration/headers.
  4. Ensure the system that calls this workflow can POST the required JSON fields (at minimum subject and approvers) to the /approval-gateway webhook URL.