Skip to content

MadhalasaSJ/Discord_Calendar_Agent

Repository files navigation

Discord_Calendar_Agent

This project is a Discord bot that integrates with Google Calendar to manage events. It allows users to create, update, and delete events from a Google Calendar directly through Discord commands. Based on your local timezone the event is created on Google Calendar.

Features

  • Create events in Google Calendar from Discord.
  • Update existing events in Google Calendar from Discord.
  • Delete events from Google Calendar from Discord.

Prerequisites

  • Python 3.8 or higher
  • A Discord bot token
  • Composio API Integrations(GITHUB & GOOGLE CALENDAR)
  • Google Calendar API credentials

Installation

  1. Clone the repository:

    git clone https://github.com/yourusername/Discord_Calendar_Agent.git
    cd Discord_Calendar_Agent
    
    
  2. Create and activate a virtual environment:

    python -m venv myenv
    source myenv/bin/activate 
    
  3. Install the required packages:

     
     pip install -r requirements.txt
    
  4. Create a .env file in the root directory of your project and add your Discord bot token:

      DISCORD_TOKEN=your_discord_bot_token
      Add your Google Calendar API credentials in a credentials.json file in the root directory of your project.
    

5.Create a config.json file in the root directory with the following structure:

```bash
    {
        "google_calendar": {
            "api_key": "your_google_api_key"
        },
        "Event_BOT": "your_discord_bot_token"
    }

Composio LangChain Integration

Composio LangChain offers seamless integration with LangChain tools, providing robust capabilities for managing and interacting with various applications such as Google Calendar. This allows for efficient scheduling, updating, and deletion of calendar events, enhancing automation and productivity in projects. Additionally, Composio CrewAI leverages these integrations to empower AI agents to perform complex tasks autonomously, streamlining workflows and improving overall efficiency.

Usage

  1. Run the bot:

      python bot.py
    
  2. Use the following commands in Discord to interact with the bot: Alt text

    i. Create an event:

       !create_event "Team Meeting" "2024-06-27T9:00:00" "2024-06-27T10:00:00" "Discuss project updates"
    

    Alt text

    ii. Update an event:

       !update_event "Team Meeting" "2024-06-28T9:30:00" "2024-06-28T11:00:00" "Discuss revised project updates"
    

    Alt text

    iii. Delete an event:

     !delete_event "Team Meeting"
    

    Alt text

Project Structure

Discord_Calendar_Agent/

├── bot.py # Main bot script

├── config.json # Configuration file

├── credentials.json # Google Calendar API credentials

├── .env # Environment variables

├── requirements.txt # Python dependencies

├── .gitignore # Git ignore file

└── README.md # Project README file

License

This project is licensed under the MIT License. See the LICENSE file for details.

Acknowledgments

  • Composio dev community

  • Discord.py developers and community

  • Google Cloud Platform and Google Calendar API developers

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages