Star My Repo if you think it is useful, THX
因為E3 email的訊息太亂太雜,希望能透過LLM統整、摘要重要訊息,並儲存在notion database上方便查閱。
Due to the chaotic and cluttered nature of E3 emails, I hope to streamline and summarize important information using LLM, and store it in a Notion database for easy reference.
Clone all files to your
git clone https://github.com/hac-ohmygod0193/auto-e3.git
pip install -r requirements.txt
Here you need to paste your own secret key to enable the power of auto-e3

- Follow the instrustions from setup tutorial source
Remember to set
Redirect URI in OAuth 2.0 Client IDstohttp://localhost:8080/
- After you finish step 6 above(download and rename the file as
client_secret.json), Execute the code below
python3 setup_gmail_api.py
- You will see the messeage like below in your terminal or just see a pop out webpage. Click and authorize with the account you apply for your gmail api.
- Copy the string in your gmail_token.json after step 4 and paste here to get encoded string.
- New Repository secrets
NamecalledBASE64_GMAIL_TOKENand paste the encoded base64 string toSecretbelow
-
Follow the instructions from here
-
Make Sure you create a new page in your notion as
databaseinstead ofpage -
Make Sure you add connection to your notion api you just create
- New Repository secrets
NamecalledDATABASE_IDand paste your id of your notion database toSecretbelow
You need
DATABASE_IDhere, which can be obtained from the web version of Notion by clicking on the page. At the end of the URL, there will be an ID that you can grab here. For example, in https://www.notion.so/ohmygod0193/test-4f3f55661c333e5585660c4c35e105334f3f55661c333e5585660c4c35e10533is the DATABASE_ID.
-
New Repository secrets
NamecalledNOTION_TOKEN -
Paste the notion api your create with step 1 to
Secretbelow
-
Head over to makersuite.google.com/app/apikey visit and sign in with your Google account.
-
Under API keys, click the “Create API key in new project” button.

-
generate google gemini api key
-
Copy the API key and keep it private. Do not publish or share the API key publicly.

-
New Repository secrets
NamecalledGOOGLE_API_KEYand paste the API key toSecretbelow
- Create a
.github/workflowsdirectory in your repository on GitHub if this directory does not already exist. - In the
.github/workflowsdirectory, create a file namedactions.yml. For more information, see "Creating new files." - Copy my actions.yml here
- You can set up your desired running schedule by changing this line
- cron:0 */3 * * *# run every 3 hours. For more crontab settings , see here
If you want to run it locally on your desktop or laptop. Just replace
os.environ["NOTION_TOKEN"]os.environ["DATABASE_ID"]innotion.pyos.environ["GOOGLE_API_KEY"]ingemini_agent.py
And Keep your gmail_token.json file under same directory with gmail.py
simplegmail Get_course_info requests method How to access gemini model notion-client-api GitHub Actions Secrets