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 IDs
tohttp://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
Name
calledBASE64_GMAIL_TOKEN
and paste the encoded base64 string toSecret
below

-
Follow the instructions from here
-
Make Sure you create a new page in your notion as
database
instead ofpage
-
Make Sure you add connection to your notion api you just create

- New Repository secrets
Name
calledDATABASE_ID
and paste your id of your notion database toSecret
below
You need
DATABASE_ID
here, 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-4f3f55661c333e5585660c4c35e105334f3f55661c333e5585660c4c35e10533
is the DATABASE_ID.
-
New Repository secrets
Name
calledNOTION_TOKEN
-
Paste the notion api your create with step 1 to
Secret
below
-
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
Name
calledGOOGLE_API_KEY
and paste the API key toSecret
below
- Create a
.github/workflows
directory in your repository on GitHub if this directory does not already exist. - In the
.github/workflows
directory, 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.py
os.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