Skip to content

TTHHA/Schedule-Slack-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Schedule ChatBot

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

Demo.mp4

Prerequisites

  • 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.

Installation

  1. Clone the repository:

    git clone https://github.com/TTHHA/AI-test.git
    cd AI-test
  2. Create and Activate a Virtual Environment:

    python -m venv venv
    source venv/bin/activate   # On Windows use `venv\Scripts\activate`
  3. Install required packages:

    pip install -r requirements.txt
  4. 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
    
  5. Set up Google OAuth2 Credentials: Download the credentials.json file from Google Cloud Console and place it in the root directory of your project.

Usage

  1. Start Ngrok:
    ngrok http 3000

⚠️ Note: Copy the generated HTTPS URL and set it in your Slack app's event subscription settings. Example: (https://abcd-efgh-ijkl.ngrok-free.app/slack/events).

  1. Run the Application
    python app.py

Usage

  1. 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.
  2. Ensure your Slack app is subscribed to events of type message.
  3. Update the permissions (scopes) of Slack.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages