wgtechlabs/unthread-whatsapp-bot

Sponsored OSS

By WG Technology Labs

Updated 1 day ago

The official Unthread extension for WhatsApp.

Image
Integration & delivery
0

8.8K

wgtechlabs/unthread-whatsapp-bot repository overview

Unthread WhatsApp Bot

Official Unthread extension for WhatsApp support via Twilio. Bridges WhatsApp customers to your Unthread support workspace — inbound, outbound, and file attachments included.

What it does
  • Converts inbound WhatsApp messages into Unthread conversations
  • Sends agent replies from Unthread back to WhatsApp
  • Sends automatic status system messages (created, closed, on hold, resumed)
  • Supports inbound and outbound file attachments via media proxy
How it works
Customer (WhatsApp) -> Twilio -> Bot -> Unthread
                                      |
Agent (Unthread) <- Webhook Server <- Redis Queue <- Bot
  • Inbound: Twilio calls POST /webhooks/twilio, the bot resolves or creates the customer and conversation in Unthread.
  • Outbound: unthread-webhook-server pushes Unthread events to Redis; this bot forwards replies to WhatsApp.
Quick Start
docker compose up -d
docker compose logs -f server
Required Environment Variables
VariablePurpose
TWILIO_ACCOUNT_SIDTwilio account SID
TWILIO_AUTH_TOKENTwilio auth token
TWILIO_WHATSAPP_NUMBERSender WhatsApp number (e.g. whatsapp:+14155238886)
TWILIO_WEBHOOK_URLPublic webhook URL for signature validation
UNTHREAD_API_KEYUnthread API key
UNTHREAD_SLACK_CHANNEL_IDUnthread target channel
POSTGRES_URLPostgreSQL connection string
Key Optional Variables
VariableDefaultNotes
REDIS_URLemptyPlatform cache via Nuvex
WEBHOOK_REDIS_URLemptyRequired for outbound replies
WEBHOOK_QUEUE_NAMEunthread-eventsQueue name used by webhook server
PORT3000App port
PUBLIC_BASE_URLderived from TWILIO_WEBHOOK_URLBase URL for media token links
MEDIA_TOKEN_TTL_SECONDS600Media proxy token TTL in seconds
Endpoints
MethodPathPurpose
POST/webhooks/twilioInbound Twilio WhatsApp webhook
GET/media/:tokenShort-lived media proxy for Twilio
GET/healthApp, version, and storage health
Prerequisites
  • Twilio account with WhatsApp sandbox or approved number
  • Unthread API key and channel ID
  • PostgreSQL
  • Redis (required for outbound events, optional for platform cache)

Licensed under GNU GPL v3.0 · Made by WG Technology Labs

Tag summary

Content type

Image

Digest

sha256:4b6ea1c68

Size

103.9 MB

Last updated

1 day ago

docker pull wgtechlabs/unthread-whatsapp-bot

This week's pulls

Pulls:

706

Last week