README: Email Digest with Gmail, OpenAI, and Slack
This is a great starter function that will ask you to set up a basic trigger, use Zapier actions, leverage packages, and secrets!
This function will summarize your important emails using OpenAI and send a daily digest to Slack. To set it up in your environment, follow the instructions below.
Prerequisites:
- Gmail Account (can be updated to an alternative email client)
- Slack Account (can be updated to an alternative chat/notification tool)
- An OpenAI account and API key
TODOs:
- Create a new function at functions.zapier.com
- Create a Schedule by Zapier trigger that triggers daily at 5pm
- Copy the main.py file contents below and paste it into your new function's main.py file
- Create another code file and name it llm_config. Copy the contents of the llm_config below and paste it into the new file. 4.Add the openai package to the packages tab in the right side panel of your new function.
- Add your OpenAI API key as a secret called OPENAI_API_KEY to the secrets tab in the right side panel of your new function.
- Update the Zapier actions in your main.py file. Search for TODOs to identify where this is necessary. Note: When you add your account_id functions may duplicate the params. Delete the new params & fill out the existing params.
- Update your location in your llm_config.py file.
- Test by pushing 'Run Function' and when you are ready, deploy!
Code Files
Loading
Loading