See llms.txt for all machine-readable content.

Back to Templates

Run a WhatsApp support agent with Nodium and OpenAI

Quick overview

This workflow receives WhatsApp messages from Nodium via webhook, verifies the request signature, and uses OpenAI to transcribe voice notes and generate replies based on your business details, with an automatic handover flow that stops the bot for conversations escalated to a human.

How it works

  1. Receives a webhook request from Nodium for each message.received event and reads the raw request body.
  2. Computes an HMAC-SHA256 signature using your Nodium webhook secret, validates the X-Nodium-Signature header, and ignores requests that fail verification or are older than 5 minutes.
  3. Loads your configured business info and evaluates the inbound message to decide whether to respond with AI text, transcribe a voice note first, send a human-handover message, ask the customer to type, or ignore the event.
  4. For voice notes, downloads the audio from the Nodium API, assigns a proper file extension, and transcribes it with OpenAI.
  5. Sends a “typing” indicator via the Nodium API and uses an OpenAI chat model with 10-message conversation memory to draft a short reply strictly from your business information.
  6. Posts the final reply back to the customer through the Nodium API with an idempotency key, or sends the configured handover/text-only response when applicable.

Setup

  1. Create a Nodium account, connect your WhatsApp Business number, and generate a Nodium API key.
  2. Activate the workflow, copy the production webhook URL from the webhook trigger, and register it in Nodium Webhooks for the message.received event along with the whsec_... secret.
  3. Paste the Nodium webhook secret into the HMAC configuration and add an HTTP Bearer Auth credential containing your Nodium API key for the Nodium HTTP requests.
  4. Add an OpenAI credential for both the OpenAI chat model and the OpenAI audio transcription steps.
  5. Update the Settings values (businessInfo, handoverWords, handoverReply, textOnlyReply, and optional API base URL) to match your business and escalation policy.