This project automates the process of adding a Slack bot to all channels, extracting messages, and storing them in a PostgreSQL database using Perceval and custom Python scripts.
- Python: Make sure Python is installed on your machine.
- psycopg2: Install the psycopg2 library using pip to interact with PostgreSQL.
- Sir Perceval: Install Perceval using pip to collect data from Slack.
- Slack Bot: Create a bot for the specific Slack workspace and obtain the API token.
PercevalDatabaseQueries.sql
: SQL scripts to create the necessary database tables.AddBotToChannels.py
: Script to add the Slack bot to all channels.PercevalDatabaseImplementation.py
: Implements the data extraction from Slack and inserts data into the database.PercevalTest.py
: Test script to verify the data extraction.
- Run the SQL code from
PercevalDatabaseQueries.sql
to create all necessary tables in your PostgreSQL database.
- Execute
AddBotToChannels.py
to automatically add your Slack bot to all channels and collect channel IDs.
- Run
PercevalDatabaseImplementation.py
to collect messages and related relevant data.Further, store it in the tables created earlier in your database.
Ensure to replace the place-holders in all the scripts with actual database credentials, API token.