WhatsApp + ChatWoot - Messages
October 30, 2025 in ChatWoot, Apps by devlikeapro6 minutes

Disclaimer
This project is not affiliated, associated, authorized, endorsed by, or in any way officially connected with WhatsApp, ChatWoot, or any of their respective subsidiaries or affiliates. The official websites can be found at https://whatsapp.com and https://chatwoot.com.
For businesses seeking to integrate with WhatsApp for critical applications, we strongly recommend using officially supported methods.
ChatWoot Articles
Series of articles about WhatsApp and ChatWoot integration using 🧩 ChatWoot App:
You can follow them one by one or skip some parts if you don’t need them.
Overview
ChatWoot automatically creates conversations when new WhatsApp messages arrive.

WAHA adds the wa/messages commands so you can import older history.
Use them to copy past chats, check imports, or fix sync issues without leaving the integration inbox.
ChatWoot Rate Limit Configuration
By default, ChatWoot set API and new message rate limits that are too low for history imports.
Set these variables in your ChatWoot deployment (for example in .env, Docker Compose, or Helm values) so WAHA can send
many messages without hitting rate limits:
CONVERSATION_MESSAGE_PER_MINUTE_LIMIT=3000
RACK_ATTACK_LIMIT=30000
# OR
RACK_ATTACK_ALLOWED_IPS={your.waha.ip.address1}👉 Without them, large history pulls often return ChatWoot API rate-limit errors (check FAQ section for details).
Messages Actions
Three actions are available:
wa/messages helpprints the full list of options.wa/messages statusreports the progress of the active or last finished pull job.wa/messages pullstarts a new history import.
You can use ‘wa/’ prefix to execute commands in any chats
You can run commands into 2 ways, depending on the conversation you’re in:
- WhatsApp Integration chat - use 
commandorwa/command. - Any other conversation in the Inbox - use 
wa/commandonly. 
# In WhatsApp Integration chat - use either with or without
help
wa/help
# In Any conversation for the Inbox - use wa/ prefix
wa/help 👉 We use the wa/ prefix in the guides, but you can omit it in the WhatsApp Integration chat:
⚙️ Override the prefix by setting the WAHA_CHATWOOT_COMMAND_PREFIX=wa/ environment variable.
Pull WhatsApp Messages
Run in the WhatsApp Integration conversation or Customer Conversation to copy messages from WhatsApp into your ChatWoot inbox.
wa/messages helpwa/messages pull- Each pull reads from WhatsApp and stores the messages in ChatWoot.
 - You control how far back WAHA looks by adding optional duration arguments.
 
The logic for message pull depends on conversation in ChatWoot:
- If it’s WhatsApp Integration conversation, WAHA pulls messages for all contacts in the selected inbox.
 - If it’s a Customer Conversation, WAHA pulls messages only for the contact linked to that
 
You can start playing with Customer Conversations to backfill history for specific users without affecting others.
wa/messages pull 1d --force --mediaUse wa/messages status to check that the pull is running, review counters, and read any warnings returned by WhatsApp.
Duration Explained
wa/messages pull [start] [end]The commands accept simple relative values such as 1d, 12h, or 30m.
WAHA sorts the two numbers so the earliest value becomes the start of the window and the latest value becomes the end.

wa/messages pull(orwa/messages pull 1d 0d) uses the default 1d | 0d window. In the example above, we ran the command on 31 Oct at 14:00, so WAHA pulled everything from 30 Oct 14:00 up to the command time.
wa/messages pull 
# The same as 
wa/messages pull 1d
# The same as 
wa/messages pull 1d 0dwa/messages pull 10d 0dcollects the last 10 days while keeping the end at “now”.
wa/messages pull 10d
# The same as 
wa/messages pull 10d 0dwa/messages pull 20d 10dcovers the range between 20 and 10 days ago, so you can restore older history in batches.
#
# Send below commands ONE BY ONE
#
wa/messages pull 30d 20d
wa/messages pull 20d 10d
wa/messages pull 10d 0d # You can omit the last 0d
# The same as 
wa/messages pull 30d 
# The same as
wa/messages pull 30d 0dYou can mix units (7d, 6h, 15m) and WAHA converts them to milliseconds automatically.
⚠️ 6m means 6 minutes, not 6 months. Use 180d for approximately 6 months.
Use Canned Responses
You can create Canned Responses in ChatWoot with shortcuts for common WAHA commands.
- In ChatWoot go to Settings → Canned Responses.
 - Click Create canned response and set a memorable shortcut like 
wa-contacts-pull. - Add the command in the body, for example 
wa/contacts pull --avatar if-missing. 

- Start typing 
/wain the conversation to see the list of available shortcuts. 

Examples
Pull the last 24 hours
Keep the defaults to backfill the recent timeline:
wa/messages pullif you want to rebuild the whole 1-day conversation in the chat you can do:
wa/messages pull 1d --forceor include media files as well
wa/messages pull 1d --force --mediaRebuild the last 10 days
Grab a broader range while still ending at the current moment:
wa/messages pull 10d # --forceInclude Media
By default, WAHA only pulls text messages to speed up the process.
You can include media attachments with --media flag:
wa/messages pull --mediaPull Other Chats
By default, WAHA only pulls messages from direct chats (1:1).
You can include groups, channels, status replies, and broadcast lists with these flags:
wa/messages pull --groups --channels --status --broadcastYou can also exclude direct messages with --no-dm flag:
wa/messages pull --no-dm --groupsResolve conversations after import
Close conversations once their history is restored so agents can focus on new tickets:
wa/messages pull --resolve-conversations--rc is a shorthand for the same option.
Import an older in batch
Backfill past interactions without rewriting newer chats:
#
# Send below commands ONE BY ONE
#
wa/messages pull 30d 20d
wa/messages pull 20d 10d
wa/messages pull 10d 0dPause new messages while pulling history
When you import big history chunks, and a new message arrives, WAHA creates it immediately in ChatWoot, so you can end up with mixed old and new messages in the same conversation.
For import big history case (especially for the first new inbox import), you can stop the queues before starting the pull and restart them after it finishes.
Queue Pause Affects All Sessions
- Pausing the queues affects ALL WhatsApp sessions connected to the same WAHA worker instance and ChatWoot inbox (to be precise, all WAHA connected to the same Redis)
 - If 
messages pull ... --pausefails, you must manually restart the queues withwa/queue start. You can check the current status withwa/queue status. 
#
# Send below commands ONE BY ONE
#
wa/queue stop
wa/queue status
wa/messages pull 1y --rc
wa/queue start
wa/queue statusThe same pause can be automated in one step with:
wa/messages pull 1y --rc --pause--pause adds the pull to the queue in a paused state and resumes the queues automatically after it completes.
Full options
Adjust the values to fit your environment and run wa/messages help to see current defaults from your build.
wa/messages helpwa/messages pull
  --chat all
  --force
  --no-dm
  --groups
  --channels
  --status
  --broadcast
  --media
  --pause
  --resolve-conversations
  --batch 100
  --progress 100
  --attempts 6
  --timeout 10m
  --timeout-media 30sFAQ
❓ Question: I’m getting “Too many messages” in the ChatWoot API response when pulling history
💬 Answer: Increase CONVERSATION_MESSAGE_PER_MINUTE_LIMIT to at least 3000 (or higher for very large imports) so ChatWoot
accepts the many messages WAHA sends during a pull.
❓ Question: I’m getting “HTTP 429 Too Many Requests” from the ChatWoot API
💬 Answer: Raise RACK_ATTACK_LIMIT to 30000 or add your WAHA servers to
RACK_ATTACK_ALLOWED_IPS={your.waha.ip.address1},{your.waha.ip.address2} to let the import traffic bypass rate
limiting.