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.
The Google Sheets script
- fetches your emails using the built-in Gmail API
- then uses the GPT-4 language model API to draft replies.
- and saves the replies as drafts in your GMail account, so you can review them before sending them.
GMailAIReplier.How.To.Start.Tutorial.Non.Tech.mov
You can watch the video tutorial or follow the following steps:
- You need an OpenAI API key, which you can get here.
- You then duplicate this Google Sheet to your Google account and configure
- your OpenAI API key
- your email address
- your prompt.
- 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
- Click a second time on "Download last 10 email threads" to check it actually works
- 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
- Enjoy!
- git clone this repository
- npm install
- clasp login, clasp push, clasp deploy, clasp open
- Make the empty Google Sheet look like this Google Sheet