Skip to content

Your GMail AI secretary πŸ€–πŸ“ An AI that drafts replies to your emails. Compatible with Google Mail personal and business version, uses OpenAI GPT4's API. All the code is run within a Google Sheet, using Google App Script, which means access to your inbox stays within your Google workspace.

License

Notifications You must be signed in to change notification settings

fabriceb/GMailAIReplier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

GMail AI Replier

What if AI could draft replies to all your emails, so all you have to do is skim through your drafts, make some changes, and click send? This is what this Google Sheet does for you, if you use Google Mail.

How it works

The Google Sheets script

  1. fetches your emails using the built-in Gmail API
  2. then uses the GPT-4 language model API to draft replies.
  3. and saves the replies as drafts in your GMail account, so you can review them before sending them.

How to use it (non-dev version)

GMailAIReplier.How.To.Start.Tutorial.Non.Tech.mov

You can watch the video tutorial or follow the following steps:

  1. You need an OpenAI API key, which you can get here.
  2. You then duplicate this Google Sheet to your Google account and configure
  • your OpenAI API key
  • your email address
  • your prompt.
  1. Click a first-time on "Download last 10 email threads" to trigger all the authorization requests allowing your Google Sheet to access your Gmail account
  2. Click a second time on "Download last 10 email threads" to check it actually works
  3. Last but not least, automate it with a trigger.
    • In the Google Sheets, click on "Extensions" > "Apps Script"
    • In the left menu, click on "Triggers" (the small alarm clock icon)
    • Click on "Add trigger" (bottom right corner)
    • Select "writeEmailRepliesToSheet" as the function to run
    • Select "Time-driven" as the event source
    • Select "Hour timer" or "Minutes timer" as the type of time based trigger
    • Click on "Save"
    • Say yes to the new auhtorization request
  4. Enjoy!

How to use it (dev version)

  1. git clone this repository
  2. npm install
  3. clasp login, clasp push, clasp deploy, clasp open
  4. Make the empty Google Sheet look like this Google Sheet

About

Your GMail AI secretary πŸ€–πŸ“ An AI that drafts replies to your emails. Compatible with Google Mail personal and business version, uses OpenAI GPT4's API. All the code is run within a Google Sheet, using Google App Script, which means access to your inbox stays within your Google workspace.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published