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.
- Create events in Google Calendar from Discord.
- Update existing events in Google Calendar from Discord.
- Delete events from Google Calendar from Discord.
- Python 3.8 or higher
- A Discord bot token
- Composio API Integrations(GITHUB & GOOGLE CALENDAR)
- Google Calendar API credentials
-
Clone the repository:
git clone https://github.com/yourusername/Discord_Calendar_Agent.git cd Discord_Calendar_Agent
-
Create and activate a virtual environment:
python -m venv myenv source myenv/bin/activate
-
Install the required packages:
pip install -r requirements.txt
-
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 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.
-
Run the bot:
python bot.py
-
Use the following commands in Discord to interact with the bot:
i. Create an event:
!create_event "Team Meeting" "2024-06-27T9:00:00" "2024-06-27T10:00:00" "Discuss project updates"
ii. Update an event:
!update_event "Team Meeting" "2024-06-28T9:30:00" "2024-06-28T11:00:00" "Discuss revised project updates"
iii. Delete an event:
!delete_event "Team Meeting"
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
This project is licensed under the MIT License. See the LICENSE file for details.
-
Composio dev community
-
Discord.py developers and community
-
Google Cloud Platform and Google Calendar API developers