Skip to main content

Chats Export

Export chats that have been synced from WhatsApp to TimelinesAI

Updated over a week ago

Note: Any custom export beyond the capability of the script can be requested as a paid service. Our Public API is available to create custom exports

The TimelinesAI Chat Export is an executable file that needs to be run locally on a Windows or macOS device.

Upon execution, it generates a collection of folders and files containing messages from WhatsApp chats synced into your TimelinesAI workspace. Once obtained, the executable file can be used an unlimited number of times (e.g., monthly or as needed).

Note: This process must be done by yourself, as the exported chat files are generated within your respective device.

How to get the executable files?

Get the API Key from TimelinesAI

  • Go to TimelinesAI

  • Then, click on "Public API" under the "Integrations" section

  • Within the "API Access Token", click on the "Generate token"

  • Lastly, copy by clicking on this button:

Important:

  • Do not regenerate the API key that you get while exporting chats. Otherwise, this operation may be affected and you may need to start over again.

  • For more information about the Public API feature, please click here.

How to use the script on Windows:

  1. Extract the obtained script into a folder in your local environment

  2. Then, hover your cursor over the executable file and select "Copy as path"

  3. Open the CMD or Command Prompt

  4. Paste the executable file path

  5. Add a space and then insert: --api_token XXX and replace the X's with your API key from TimelinesAI

  6. Add another space after the API key and insert the specific argument you'd like to work with (refer to the "Supported Arguments" list below)
    Example: "C:\Users\{your_windows_user}\{folder}\export.exe" --api_token xxxxx-xxxx-xxxx-xxxx-xxxxxxxx --whatsapp_account +12345678910

  7. Press Enter/Intro and let the export begin

How to use the script on macOS:

  1. Extract the obtained script

  2. In the OS settings, enablñe the option to "Run applications from unidentified developers."

  3. Preferably, place the extracted file in the root of the user folder

  4. Open the Terminal

  5. Run the command: /Users/{your_mac_user}/{folder}/export --api_token xxx

  6. Add another space after your API key and insert any of the specific arguments you'd like to work with (refer to the "Supported Arguments" list below)

Supported Arguments:

  • To download attachments: --download_attachments
    Example: export.exe --api_token XXX --download_attachments

  • To export messages after a specified date (format: YYYY-MM-DD): --start_date {your_date}
    Example: export.exe --api_token XXX --start_date 2026-02-17

  • To export messages before a specified date (format: YYYY-MM-DD): --end_date {your_date}
    Example: export.exe --api_token XXX --end_date 2026-02-17

  • To export messages from a specific WhatsApp account phone number that you have connected to TimelinesAI: --whatsapp_account {+12345678910}
    Example: export.exe --api_token XXX --whatsapp_account +972501111111

  • To show a help message with the supported arguments: -h
    Example: export.exe --api_token XXX -h

Once the script execution is initiated, you will see the following output:

At the beginning, it will show the following:

Chat ID: XXX, Chat Name: YYYY, Messages Exported: ZZZ, Attachments Downloaded: ZZZ, API Errors: 0

Once the whole operation is done, it will end with:

Export Completed!Number of API requests made: XTotal running time: X secondsTotal number of WA accounts exported: XTotal number of Chats exported: XTotal number of Messages exported: XTotal number of attachments downloaded: XTotal size of attachments downloaded: X.XX MB

Note: Execution time depends on the number of chats/messages in your workspace. It might take from several minutes to several hours.

Execution results

  1. Open the folder with the script

  2. When the script has been successfully executed, it will contain folder(s) with chat exports. If you have multiple WhatsApp accounts and have executed an export for several of them, each WhatsApp account will be represented by its own folder:

  1. Open the desired folder

  2. Each folder will have an overview Excel spreadsheet and subfolders:

  • Overview Excel Spreadsheet will contain the list of chats and their Chat IDs with the following additional chat information:

  • Subfolders represent a single chat and are named after the corresponding chat ID. Each subfolder, in turn, will have an Excel file with all the messages from the particular chat ID. This Excel file will contain the following information:

Did this answer your question?