This application serves to simplify scheduling meetings by integrating Slack messaging with Google Calendar. Users can convey availability in Slack, and the application interprets these messages, manages scheduling, and confirms appointments, reducing the need for back-and-forth coordination. Through natural language processing (NLP) and the use of generative AI, the app can understand and categorize user messages, extracting free and busy times, and then utilize Google Calendar’s API to automatically schedule the meetings.
Demo.mp4
- Python 3.8+
- Ngrok for exposing local server.
- A Google Cloud project with Calendar API enabled.
- Google OAuth2 Credentials file (
credentials.json
) for Google Calendar API. - Slack App with necessary permissions and signing secret.
-
Clone the repository:
git clone https://github.com/TTHHA/AI-test.git cd AI-test
-
Create and Activate a Virtual Environment:
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install required packages:
pip install -r requirements.txt
-
Create a
.env
file in the root directory and add the following environment variables:SLACK_SIGNING_SECRET=your_slack_signing_secret SLACK_BOT_TOKEN=your_slack_bot_token SCHEDULE_CHANNEL_ID=channel_id GEMINI_API_KEY=your_api_key
-
Set up Google OAuth2 Credentials: Download the
credentials.json
file from Google Cloud Console and place it in the root directory of your project.
- Start Ngrok:
ngrok http 3000
- Run the Application
python app.py
- When running the app for the first time, you will be prompted to authenticate with your Google account. Follow the instructions in the console to complete the authentication process.
- Ensure your Slack app is subscribed to events of type message.
- Update the permissions (scopes) of Slack.