This project is an automation tool that connects to a Slack workspace, retrieves messages, sends them to OpenAI's API for structured data extraction, and organizes the data into a Google Sheet.
slack-automation-tool
├── src
│ ├── main.py # Entry point of the application
│ ├── slack_client.py # Handles Slack API interactions
│ ├── openai_client.py # Interfaces with OpenAI API
│ ├── google_sheets_client.py # Manages Google Sheets interactions
│ ├── utils
│ │ └── helpers.py # Utility functions for data processing
├── requirements.txt # Project dependencies
├── config
│ └── settings.py # Configuration settings
├── .env # Environment variables
└── README.md # Project documentation
-
Clone the repository:
git clone <repository-url> cd slack-automation-tool
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS/Linux:
source venv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Create a
.env
file in the root directory and add your API keys:SLACK_API_TOKEN=<your_slack_api_token> OPENAI_API_KEY=<your_openai_api_key> GOOGLE_SHEETS_API_KEY=<your_google_sheets_api_key>
-
Modify
config/settings.py
to adjust any other settings as needed.
To run the application, execute the following command:
python src/main.py
This will initiate the process of retrieving messages from Slack, sending them to OpenAI for structured data extraction, and writing the results to Google Sheets.
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for details.