Import WhatsApp Chat Export
whatsapp_import_chatImport a WhatsApp chat export file to backfill historical messages into the message store without duplicating existing data.
Instructions
Import a WhatsApp chat export file (ZIP or TXT) into the message store.
Use this to backfill historical messages from WhatsApp's "Export Chat" feature. Only inserts new messages — won't overwrite or duplicate existing data.
The file should be a WhatsApp chat export:
ZIP file containing a .txt (standard WhatsApp export format)
Or a plain .txt file
The chat name is extracted from the filename (e.g., "Conversa do WhatsApp com NAME.zip"). You can override it with the chatName parameter.
Messages are matched to existing contacts by name. If a contact doesn't exist, it's created. If the chat already exists in the store (by name), messages are added to it.
Args:
filePath: Absolute path to the ZIP or TXT file on the server
chatName: Optional override for the chat name (extracted from filename if omitted)
Returns:
chat_name: Resolved chat name
total_parsed: Number of messages found in file
inserted: New messages added
skipped_duplicates: Messages already in store
senders: List of sender names found
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Absolute path to the WhatsApp export ZIP or TXT file on the server | |
| chatName | No | Override chat name (extracted from filename if omitted) |