Slack Free Tier has a storage of upto 1000 messages. Run this script periodically to fetch the data from Slack and store it in a Postgres Database.