# Chatwoot Integration Seamlessly connect Botpress with Chatwoot for powerful customer support automation with live agent handoff capabilities. ## Features - **Multi-Number Support**: Automatically handles multiple WhatsApp numbers via Chatwoot inbox IDs - **Phone Number Extraction**: Automatically extracts and sends customer phone numbers - **Full Attachment Support**: Handles images, videos, voice notes, audio files, locations, and other file types - **Bidirectional Communication**: Messages flow seamlessly between Chatwoot and Botpress - **Live Agent Handoff**: Transfer conversations to human agents when needed ## Configuration ### Basic Setup - `botToken`: Your Chatwoot API access token - `baseUrl`: Your Chatwoot instance URL (e.g., https://app.chatwoot.com) - `accountNumber`: Your Chatwoot account number - `inboxNumber`: Your Chatwoot inbox number ### Multi-Number Support The integration automatically tracks conversations by **inbox ID**. When you have multiple WhatsApp numbers in Chatwoot, each conversation is automatically identified by its inbox ID. No additional configuration needed! ## Supported Message Types **Incoming (Chatwoot → Botpress):** - Text messages with phone numbers - Images, videos, audio/voice notes - Locations with coordinates - Files and documents **Outgoing (Botpress → Chatwoot):** - Text messages - Media attachments (images, videos, audio) - Location sharing - Interactive choice buttons ## Use Cases - Customer support automation - Multi-channel messaging - E-commerce order tracking - Appointment scheduling - Lead qualification and routing This is a community-made Integration. It was developed by Michael Barney & ProAI. Enhanced with multi-number support, phone number extraction, and full attachment handling. Open-Source Repo: https://github.com/refaat-ordstage/chatwoot-extra-info ## Extracting Data in Botpress All data from Chatwoot is available in `event.payload`: - **Phone Number**: `event.payload?.customerPhoneNumber` - **Text**: `event.payload?.text` - **Location**: `event.payload?.latitude` and `event.payload?.longitude` - **Image**: `event.payload?.imageUrl` - **Video**: `event.payload?.videoUrl` - **Audio**: `event.payload?.audioUrl` - **Inbox ID**: `conversation.tags?.["chatwoot:inboxId"]` See the README for complete examples. ### Changelog v1.0.4 - Removed botId configuration, now uses inboxId for multi-number support. Cleaner implementation. v1.0.3 - Added multiple bot support, phone number extraction, and full attachment handling v1.0.2 - Fixed issue with "Send to Agent" action.