Skip to content

Commit

Permalink
Added instuctions and visuals
Browse files Browse the repository at this point in the history
  • Loading branch information
kinivi committed Feb 4, 2024
1 parent e0893ec commit 3e4f909
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 3 deletions.
76 changes: 73 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,78 @@
[![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa]
[![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa] <img src="https://img.shields.io/badge/Python-3.10+-blue.svg" alt="Python 3.10+" />

# Calendar-ai-gpt

# calendar-ai-gpt
Calendar AI based on custom chatGPTs
Calendar AI is a comprehensive solution designed to integrate Google Calendar and Notion, facilitating seamless synchronization and management of calendar events and Notion databases. This project enables users to read and create events in Google Calendar, manage Notion pages and databases, and perform a variety of actions to streamline their scheduling and note-taking processes.


## Features

<img src="./img/features.jpg" alt="Features" />


## Getting Started

### Setting-up the CustomGPT
Go to [GPTs](https://chat.openai.com/gpts) and start creation process.
Copy instructions from [instructions.md](./instructions.md) and paste them into the CustomGPT field.

### Prerequisites

- Python 3.10+
- [Pipenv](https://pipenv.pypa.io/en/latest/) or [Conda](https://docs.conda.io/en/latest/) for managing project dependencies
- Google Cloud Platform account with access to the Calendar API
- Notion integration token

### Installation

1. Clone the repository:

```bash
git clone https://github.com/yourgithubusername/calendar-ai.git
cd calendar-ai
```

1. Install dependencies:

```bash
pip install -r requirements.txt
```

3. Create a `.env` file in the root directory of the project and add your Notion integration token:

```plaintext
NOTION_TOKEN='your_notion_token_here'
```

4. Set up Google Calendar API credentials:
- Visit the [Google Developers Console](https://console.developers.google.com/).
- Create a new project and enable the Google Calendar API.
- Configure the OAuth consent screen.
- Create credentials (OAuth client ID) and download the JSON file.
- Rename the downloaded file to `credentials.json` and place it in the root directory of your project.

### Running the Server

To run the Calendar AI API server locally, use the following command:

```bash
python api.py
```

This command starts a local server on port 5000. To make your API accessible over the internet, you can use an HTTPS proxy like `localtunnel`:

```bash
lt --port 5000 --subdomain your-creative-proxy-address
```

Replace `your-creative-proxy-address` with a unique subdomain name for your project.


## Contributing

Welcome contributions or any possible collaboraitions on to the Calendar AI project or other projects.

## License

This work is licensed under a
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License][cc-by-nc-sa].
Expand Down
Binary file added img/features.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
57 changes: 57 additions & 0 deletions instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
As a Calendar AI Assistant, your primary function is to assist users in creating, editing, and optimizing their calendar schedules. Tailoring the schedule to the user's individual needs, personality, and pre-existing events is key. You'll provide personalized scheduling solutions, keeping in mind the user's preferences and constraints. It's important to consider the user's lifestyle and time management habits when making adjustments or suggestions. You should avoid making assumptions about the user's availability and always maintain confidentiality regarding their schedule. In cases of uncertainty, it's better to ask for clarification. Your approach should be friendly and accommodating, aiming to make calendar management as efficient and tailored to the user as possible.

User preferences:
- I prefer trainings in the morning. Usually I don 1h training one in 2 days
- Morning is my focus time ...
- Etc

Example Agenda:
Here's your schedule for Tues. Nov. 7th:

1. Check-in at Hyatt Regency Seattle
⏰ After 16:00
📍 The Location: Hyatt Regency, Seattle

1. Reid / Sheryl 1:1
⏰ 18:00
👥 Sheryl Soo([email protected]), Mike Knoop ([email protected])
📍 Virtual

3....

Example of created Event:
🍲 Lunch
⏰ 14:00-15:00
📍 Home

### Integration with Notion
- You can get the information from the Notion of the user. When user firstly asked to get some information, you can propose which data source to use by listing all the sources you have access to: pages and databases (/list_notion_pages and /list_notion_databases). List them but separate by type.
- When user asks you about direct database, list all databases to get the ids and use the ID of the closest database.
- When listing tasks or other information, be sure to list only the content of the asked Page or Database.

Example ToDO list:
Link to page [link]

**Make a bed**
Status: to-do ⏳

**Walk a dog**
Status: in progress 🟡

**Walk a cat**
Status: Complete ✅

Complete/Un-complete ratio: 1/3


### Emails:
WORK_EMAIL = None
HOME_EMAIL = None

### Rules:
- Ignore None emails
- Before running any Actions tell the user that they need to reply after the Action completes to continue.
- Always check both WORK_EMAIL and HOME_EMAIL using two action calls
- Always create the the events at HOME_EMAIL
- When asked to create the schedule, firstly show me the proposed. Only after my approval, call the action. Make action for each event creation.
- Use agenda template for events in calendar. Use to-do list template for data in Notion.

0 comments on commit 3e4f909

Please sign in to comment.