{"id":28089228,"url":"https://github.com/vishal-android-freak/build-with-ai","last_synced_at":"2025-05-13T12:55:13.500Z","repository":{"id":288726559,"uuid":"965234476","full_name":"vishal-android-freak/build-with-ai","owner":"vishal-android-freak","description":"Gemini 2.5 Pro Powered Email Assistant Integrated With Google Calendar","archived":false,"fork":false,"pushed_at":"2025-04-19T07:32:22.000Z","size":1326,"stargazers_count":1,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-19T14:24:33.299Z","etag":null,"topics":["gemini","langchain","langgraph","langgraph-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vishal-android-freak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-12T17:53:42.000Z","updated_at":"2025-04-19T07:31:56.000Z","dependencies_parsed_at":"2025-04-19T14:24:45.874Z","dependency_job_id":"e32a1b18-657b-4213-9675-5882b11e1a9a","html_url":"https://github.com/vishal-android-freak/build-with-ai","commit_stats":null,"previous_names":["vishal-android-freak/build-with-ai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-android-freak%2Fbuild-with-ai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-android-freak%2Fbuild-with-ai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-android-freak%2Fbuild-with-ai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vishal-android-freak%2Fbuild-with-ai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vishal-android-freak","download_url":"https://codeload.github.com/vishal-android-freak/build-with-ai/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948332,"owners_count":21988953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gemini","langchain","langgraph","langgraph-python"],"created_at":"2025-05-13T12:55:12.980Z","updated_at":"2025-05-13T12:55:13.488Z","avatar_url":"https://github.com/vishal-android-freak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Email Assistant\n\nA smart email and calendar management system powered by Gemini Pro that automatically processes incoming emails and manages calendar events.\n\n## Features\n\n- **Automated Email Processing**: Monitors inbox for new emails every minute\n- **Smart Email Responses**: Generates contextual email responses using Gemini Pro\n- **Calendar Management**: Automatically handles calendar event creation, updates, and deletions\n- **Gmail Integration**: Seamlessly works with Gmail for email management\n- **Google Calendar Integration**: Direct integration with Google Calendar for event management\n\n## Project Structure\n\n```text\n├── main.py              # Main application entry point\n├── agents.py            # AI agents configuration and prompts\n├── models.py            # AI model configurations\n├── tools/\n│   ├── gmail_tools.py   # Gmail API integration tools\n│   ├── calendar_tools.py # Google Calendar API tools\n│   └── logger.py        # Logging utilities\n```\n\n## Prerequisites\n\n- Python 3.x\n- Google Cloud Project with Gmail and Calendar APIs enabled\n- Google OAuth 2.0 credentials\n\n## Installation\n\n1. Clone the repository\n\n   ```bash\n   git clone https://github.com/vishal-android-freak/build-with-ai.git\n   cd build-with-ai\n   ```\n\n2. Install dependencies:\n\n   ```bash\n   # setup a virtual environment\n   python -m venv venv\n   source venv/bin/activate\n   pip install -r requirements.txt\n   ```\n\n3. Generate the API Key and save under `.env`\n4. Set up Google OAuth 2.0 credentials and save them appropriately\n\n## Generating \u0026 Adding the API Key in the project\n\n1. Go to [https://aistudio.google.com/apikey](https://aistudio.google.com/apikey)\n\n2. Click on create API Key\n\n   \u003cimg width=\"1739\" alt=\"image\" src=\"https://github.com/user-attachments/assets/a4a194e7-65c8-4593-8a68-5e0bf8dd6b66\" /\u003e\n\n3. Select the project from the dropdown\n\n   \u003cimg width=\"514\" alt=\"Screenshot 2025-04-13 at 5 20 47 PM\" src=\"https://github.com/user-attachments/assets/a06b9d61-0ef1-407c-b80f-f91fd52aa6f6\" /\u003e\n\n   In case you do not have any existing Google Cloud Projects that appear in the dropdown, create a new Google Cloud Project at [https://console.cloud.google.com/projectcreate](https://console.cloud.google.com/projectcreate) with the name of your choice and then resume creating a new API key under this newly created project\n\n4. Copy the generated API Key\n\n5. Open the project in any IDE of your choice (For eg. `VSCode`)\n\n6. Rename the file `.env.example` to `.env`\n\n7. Paste the API Key as\n\n   ```bash\n   GOOGLE_API_KEY=AIzaXXXXXXXXXXXXXXXXXXXXXX\n   ```\n\n8. Restart the IDE so that it recognizes the API key\n\n## Setting up OAuth 2.0 Credentials\n\n1. Go to [https://console.cloud.google.com/auth/overview](https://console.cloud.google.com/auth/overview). Click on `Get Started`\n\n   \u003cimg width=\"1792\" alt=\"Screenshot 2025-04-13 at 5 10 25 PM\" src=\"https://github.com/user-attachments/assets/0e513e06-31b9-4e1c-8025-858e0b6a2dac\" /\u003e\n\n2. Under App Information, give any name to your app and select your email id from the drop down under user support email and click next\n\n   \u003cimg width=\"628\" alt=\"Screenshot 2025-04-13 at 5 11 08 PM\" src=\"https://github.com/user-attachments/assets/36698341-178a-450e-b4cd-ace43b42aedc\" /\u003e\n\n3. Under Audience, select external and click next\n\n   \u003cimg width=\"728\" alt=\"Screenshot 2025-04-13 at 5 11 20 PM\" src=\"https://github.com/user-attachments/assets/5f41c84e-3118-4cd4-a2e2-02a71ae9557e\" /\u003e\n\n4. Put any email id under contact information and click next\n\n   \u003cimg width=\"694\" alt=\"Screenshot 2025-04-13 at 5 11 28 PM\" src=\"https://github.com/user-attachments/assets/d97c60e5-90b7-4e46-90a6-90fa7ade189d\" /\u003e\n\n5. Accept the terms and conditions and click continue\n\n   \u003cimg width=\"561\" alt=\"Screenshot 2025-04-13 at 5 11 43 PM\" src=\"https://github.com/user-attachments/assets/1bb1f725-38ec-472f-9c6c-be208e8dfe7c\" /\u003e\n\n6. Now go the clients section and click on Create Client\n\n   \u003cimg width=\"1106\" alt=\"image\" src=\"https://github.com/user-attachments/assets/8ac8b660-8008-490c-a63c-93b3f98c7732\" /\u003e\n\n7. Select application type as desktop application and give it any name. Then press Create.\n\n   \u003cimg width=\"1008\" alt=\"Screenshot 2025-04-13 at 5 12 34 PM\" src=\"https://github.com/user-attachments/assets/3bc10864-dd19-4f66-8ddc-a19e8f2d4580\" /\u003e\n\n8. Click on Download JSON and download the credentials file\n\n   \u003cimg width=\"264\" alt=\"image\" src=\"https://github.com/user-attachments/assets/9a7e9255-577b-4e19-9355-147d81e0face\" /\u003e\n\n9. Go to the project's root directory and paste the file. Rename it to `credentials.json`. This is an essential step for our backend code to recognize the client\n\n10. Go to the Audience section and click on Publish App\n\n   \u003cimg width=\"1323\" alt=\"Screenshot 2025-04-13 at 5 15 15 PM\" src=\"https://github.com/user-attachments/assets/56820724-d250-469a-8645-0a773a9c8b10\" /\u003e\n\n11. Now at the top search bar on the Google cloud dashboard, search for calendar and click on Google Calendar API\n\n    \u003cimg width=\"829\" alt=\"image\" src=\"https://github.com/user-attachments/assets/31db53b9-b979-4311-b21a-dcae7d5d46e8\" /\u003e\n\n12. Click on Enable\n\n    \u003cimg width=\"750\" alt=\"Screenshot 2025-04-13 at 5 17 59 PM\" src=\"https://github.com/user-attachments/assets/480493ec-491e-4327-880e-5c6fd681c666\" /\u003e\n\n13. Similarly, search for Google Gmail API and enable it\n\n    \u003cimg width=\"750\" alt=\"Screenshot 2025-04-13 at 5 17 59 PM\" src=\"https://github.com/user-attachments/assets/2e0603f1-e41c-4ad4-a027-b2d38f4b1244\" /\u003e\n\nWe are all set!\n\n## Usage\n\nRun the main application:\n\n```bash\npython main.py\n```\n\nIn case you are running the app in a terminal session different from the one in which you activated virtual environment, run the app using:\n\n```bash\nsource venv/bin/activate \u0026\u0026 clear \u0026\u0026 python main.py\n```\n\nThe assistant will:\n\n1. Check for new emails every minute\n2. Process emails using AI to understand context and requirements\n3. Generate appropriate responses and create drafts\n4. Handle calendar events when scheduling is involved\n\n## Dependencies\n\nKey dependencies include:\n\n- google-api-python-client: Google API client library\n- langgraph: For creating reactive AI agents\n- schedule: For periodic task scheduling\n\n## Configuration\n\nEnsure proper setup of:\n\n1. Google OAuth 2.0 credentials\n2. Gmail API access\n3. Google Calendar API access\n\n## Examples\n\nHere are some examples of the Email Assistant in action:\n\n### Inbox Email 1\n\n![Inbox Email Example 1](examples/inbox-mail-1.jpeg)\n\n### Calendar Event Created 1\n\n![Calendar Event Created 1](examples/calendar-event-created-1.jpeg)\n\n### Response Draft 1\n\n![Response Draft Example 1](examples/response-draft-1.jpeg)\n\n### Inbox Email 2\n\n![Inbox Email Example 2](examples/inbox-mail-2.jpeg)\n\n### Response Draft 2\n\n![Response Draft Example 2](examples/response-draft-2.jpeg)\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishal-android-freak%2Fbuild-with-ai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvishal-android-freak%2Fbuild-with-ai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvishal-android-freak%2Fbuild-with-ai/lists"}