This script is made to convert exported Telegram group history into Slack import format, because Slack itself does not provide tools to do it.
There might be minor bugs or errors so feel free to open Pull Requests to improve this code.
Requires Python 3.8 or higher.
pip3 install -r requirements.txt
- Download Telegram chat history in JSON format
- for Mac use this client to export chat history
- Run
python main.py
and follow instructions:- Enter an absolute path to
result.json
file; - Get your converted TXT file in
converted_files
directory;
- Enter an absolute path to
- Upload generated TXT file to Slack and press Start Import
- Wait for file processing to finish (you will also receive an email when it's done)
- Configure the import settings - press the button Information required (same page)
- User mapping - map Telegram users to Slack users;
- Channel mapping - map Telegram chats to Slack channels;
current version supports only one Telegram chat export, so make sure there is no other Slack channels offered to import to in case of some data convert bugs
- Click Save Changes and check your import settings
- Click Yes, proceed with this import if all correct
- Wait till data import is complete (you will receive an email)
If there were any errors on converting, they will be saved in converted_files
directory
- Only supports text messages (No images, videos, etc.), but in case if message contains link to image or file, message link will be added to message text
- Only supports one chat at a time
- No tg_user_id <-> tg_username mapping
- No Telegram-Slack user mapping (you will be asked to map users manually)
- Message responses are not linked to original message
- No support for Slack threads
- Text formatting not supported by slack will be converted to bold or left as plain text
- No service messages (e.g. "User joined the group")
"
char replaced to'
in messages due to import problems- Known Slack import fails