Chats Export

The Chat Export script is offered by TimelinesAI support under specific terms and conditions, tailored to each customer. To discuss pricing (if applicable), please reach out to our support team at hello@timelines.ai

The TimelinesAI Chat Export script is an executable file that needs to be run locally on a Windows OS. It generates a collection of folders and files containing messages from all chats within your workspace. Once obtained, the script can be executed an unlimited number of times (e.g., monthly or as needed).

How to use the script



Extract obtained script into a folder in your local environment ( ex: PC running on Windows OS).
Open the command line and navigate to the folder with your file
Run the script. Sample command:

.\export.exe --api_token XXX


replace XXX is your own Public API token from https://app.timelines.ai/integrations/api/

Other supported arguments:

--download_attachments - downloads attachments. Example: .\export.exe --api_token XXX --download_attachments
-- start_date START_DATE
--end_date END_DATE
--whatsapp_account XXXXXXXX@s.whatsapp.net - downloads chats only from specified WhatsApp account. Example: .\export.exe --api_token XXX --whatsapp_account 972502222222@s.whatsapp.net , where 972502222222 is to be replaced by your own number.

Successful script execution will start with following output:

Running API request: GET chats with params {your_params_here}
Fetched page X with Y chats.
Exported chats to XXXXXXXX/chats_XXXXXXXX.xlsx (Page X)


followed by multiple:
Running API request: GET chats/XXXX/messages with params {'page': X}


and end with:
Export Completed!

Number of API requests made: X
Total running time: X seconds
Total number of WA accounts exported: X
Total number of Chats exported: X
Total number of Messages exported: X
Total number of attachments downloaded: X
Total size of attachments downloaded: X.XX MB


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

Script execution results



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


Open the desired folder
Each folder will have an overview Excel spreadsheet and subfolders.



Overview Excel Spreadsheet will contain the following data:

Subfolders represent a single chat and are named after corresponding chatIDs. Each subfolder, in turn, will have one more Messages Excel file with all the messages from the particular chatID. This Excel file will contain following data:

Updated on: 23/09/2024

Was this article helpful?

Share your feedback

Cancel

Thank you!