
Built a script to auto-archive old Slack messages. Company storage limit disappeared.
Built a script to archive old Slack messages automatically. Company storage limit disappeared. Our workspace kept hitting the 10K message limit. Every month someone had to manually export conversations and delete stuff. Took 2 hours each time. Figured there had to be a way to automate it. Started Simple Slack free tier caps at 10,000 messages. Once you hit it, old messages disappear unless you upgrade. Small team. Not worth paying $8 per person just for message history. Manual process sucked: Export conversations as JSON Upload to Google Drive Delete messages from Slack Hope you remember where you saved everything Took forever. People kept forgetting to do it. What I Built Python script that runs monthly. Connects to Slack API, grabs messages older than 90 days, saves them to markdown files, posts archive link to a channel, then deletes from Slack. import os from slack_sdk import WebClient from datetime import datetime , timedelta slack_token = os . getenv ( ' SLACK_BOT_TOKEN ' ) clien
Continue reading on Dev.to Python
Opens in a new tab


![[MM’s] Boot Notes — The Day Zero Blueprint — Operations from localhost to production without panic](/_next/image?url=https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1433%2F1*cD3LWDy_XXNTdZ_8GYh6AA.png&w=1200&q=75)

