Git Product home page Git Product logo

auto-draft's Introduction

Auto Draft - Email Automation System with Mendable AI

Description

This project provides an automated email handling system using the Gmail API and Mendable.ai. It is able to categorize emails and automatically draft replies to it. It also create alerts using various APIs and tools, ensuring that your inbox is smartly managed.

How it works?

Currently the system is able to read your inbox and determined which emails are of a customer support nature. It then uses Mendable AI to draft a reply to the email. If the reply is satisfactory, it will be saved as a draft in your Gmail account.

The system also uses Slack to send alerts to the user for manual review or intervention as needed.

Current Features

  • Authenticate and Interact with Gmail API
  • AI Classification (Customer Support)
  • Draft Replies
  • Slack Alerts
  • Add webhook to listen to incoming emails

Prerequisites

Google Cloud Platform (GCP) Project: Create a project and enable the Gmail API. OAuth 2.0: Set up OAuth 2.0 as a Desktop app and download the client configuration to get your credentials (a `credentials.json`` file). This will allow the script to authenticate with the Gmail API.

Also ensure you have the following installed:

  • Python 3.8 or later
  • PIP

Installation & Setup

  1. Clone the Repository
    git clone [Your Repo Link]
    cd [Your Repo Name]
  2. Install Dependencies
    pip install -r requirements.txt
  3. Environment Variables Create a .env file in the root directory and define the following variables:
    MENDABLE_SERVER_API_KEY=your_key_here
    OPENAI_API_KEY=your_key_here
    SLACK_WEBHOOK_URL=your_webhook_url_here
    Replace the placeholder values with your actual API keys and URL.

Usage

Ensure all prerequisite steps are completed before running the script:

python app.py

How it Works

Authenticate and Interact with Gmail API: Retrieves and manages emails. AI Analysis: Evaluates email content to generate auto-responses and categorize email types. Draft Replies: Formulates reply drafts for emails and saves them in Gmail. Alerts: Sends alerts to Slack for manual review or intervention as needed.

Note

Ensure you have enabled Gmail API and have the credentials.json file for authenticating. If modifying scopes in the code, make sure to delete the token.json to re-authenticate and validate the new scopes. Ensure that all sensitive data, such as API keys and secrets, are kept secure and not exposed in the code or public repositories.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

auto-draft's People

Contributors

nickscamara avatar

Stargazers

 avatar Pedro Marcelino avatar Nathan Lloyd Ward avatar Hidde avatar  avatar  avatar Stefan Kummerlöw avatar  avatar Marcin Jeleński avatar Ali avatar Raphael Caldas avatar  avatar Matt avatar Kasun Wijesekara avatar  avatar Eric Ciarla avatar

Watchers

Brad Jones avatar  avatar  avatar

Forkers

jeff-burke mz0in

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.