import_chat_export
Import a WhatsApp "Export chat" file (.txt or .zip) to backfill history older than phone sync, skipping duplicates and already-synced messages. Run dry_run first to preview counts.
Instructions
Add the messages of a WhatsApp "Export chat" file to a chat, for history older than the phone sync.
path is a .txt file or a .zip (text plus media) inside downloads_dir, exports_dir or a folder in import.allowed_dirs. chat is a JID, a phone number or a chat name. me is the sender name that is you, as the export shows it; it is needed unless the file name or the account's push name tells. date_order is dmy, mdy or ymd and is detected when the file allows it. timezone is the zone the export was made in (default: local time). names maps a sender name to a JID or phone number.
Run it with dry_run=true first: it reports the counts, the detected date order and how each sender name would be stored, and writes nothing. The same file can be imported again without creating duplicates, and messages that the phone already synced are skipped. Nothing is sent to anyone. Needs the bridge to be running.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>",
"chat": "<chat>"
},
"name": "import_chat_export"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| me | No | ||
| chat | Yes | ||
| path | Yes | ||
| names | No | ||
| account | No | Account from list_accounts when several WhatsApp numbers are set up; default: default | |
| dry_run | No | ||
| timezone | No | ||
| date_order | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||