Every hour
Summarise and sort new emails into a Notion inbox
Every hour, your new emails are summarised, given a category and added to your Notion inbox database with any action needed.
- Runs
- Every hour
- Apps
- Gmail, Notion
- AI
- Yes, uses the built-in AI allowance
- Access
- Gmail gmail.readonly; Notion insert
Send this to your assistant
Create a ClickRuntime automation: every hour, summarise and categorise my new emails and add each one to my Notion inbox database with a category, summary and next action.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A founder gets a mix of customer questions, investor updates, invoices and newsletters in one inbox. He plans his week in Notion, but email lives elsewhere, so important messages are read once and then forgotten under newer ones.
A Notion entry for each email, with a one-line summary and a suggested next action, brings the inbox into the place where work is planned. He can sort, filter and assign from there.
What you get out of it
Read the gist without opening each email
A one-line summary tells you what the email wants. You decide what needs attention in a fraction of the time.
Email sits next to your tasks
Messages become rows in the same workspace as your projects. Follow-ups are planned, not remembered.
Categories you can filter
Customer, finance, partner, newsletter: each email is labelled. A filtered view shows only what matters today.
Nothing important slips
Each email that needs action has a next step recorded. Reviewing the database weekly catches anything left open.
How it works
What happens, step by step
Every hour, ClickRuntime checks your Gmail for emails that arrived since the last check.
Emails already added are skipped, so each appears in Notion once.
AI writes a one-line summary, picks a category and suggests a next action for each email.
A page is created in your Notion inbox database with those details and a link back to the email.
Before it runs live
- Connect Google through your own Google app (a one-time, 10-minute setup), so it works with your own Gmail
- Connect Notion and share the database you want it to use
What you get
Build your own
Need it to work differently?
Your own rules
Conditions, thresholds, filters and exceptions, written the way you'd explain them to a colleague.
Any number of apps
One automation can read from one app and update several others. Over 248 apps are ready, and anything with an API works too.
AI where it helps
Summaries, classification, extraction and drafts use ClickRuntime's built-in AI, with no extra key.
On a schedule or on each event
Runs as often as every 5 minutes, or the moment an app sends an event, and keeps track of what it already handled.
Changes you can ask for
- Act only on the items that match your own rules, and skip the rest
- Change what the AI looks for, or how it writes the result
- Add another app, for example also send it to Slack
- Combine it with other Gmail and Notion steps into one automation
Under the hood
The code that runs this automation
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, http, state, ai, report_fetched
DB_ID = "your-notion-database-id"
SCHEMA = {"type": "object", "properties": {"summary": {"type": "string"}, "category": {"type": "string",
"enum": ["Customer", "Finance", "Partner", "Newsletter", "Other"]}, "action": {"type": "string"}}}
@on_trigger
def run(event):
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages()
seen = state.get("seen") or []
new = [m["id"] for m in gmail.list(userId="me", q="in:inbox newer_than:1d -category:promotions").execute().get("messages", []) if m["id"] not in seen]
report_fetched(len(new))
if not new:
return {"new": 0}
notion = {"Authorization": f"Bearer {credentials.connection('notion', 'work')}", "Notion-Version": "2022-06-28"}
for mid in new[:40]:
m = gmail.get(userId="me", id=mid, format="metadata", metadataHeaders=["From", "Subject"]).execute()
h = {x["name"]: x["value"] for x in m["payload"]["headers"]}
try:
r = ai.generate(f"From: {h.get('From')}\nSubject: {h.get('Subject')}\n{m['snippet']}", json_schema=SCHEMA, max_output_tokens=120).json
except ai.AIError:
r = {"summary": m["snippet"][:200], "category": "Other", "action": ""}
http.post("https://api.notion.com/v1/pages", headers=notion, json={"parent": {"database_id": DB_ID}, "properties": {
"Name": {"title": [{"text": {"content": h.get("Subject", "(no subject)")[:200]}}]},
"Category": {"select": {"name": r["category"]}}, "Summary": {"rich_text": [{"text": {"content": r["summary"]}}]},
"Next action": {"rich_text": [{"text": {"content": r["action"]}}]}, "Link": {"url": f"https://mail.google.com/mail/u/0/#all/{mid}"}}})
seen.append(mid)
state.set("seen", seen[-1000:])
return {"new": len(new)}FAQ
Common questions
Which categories does it use?
Is the full email copied into Notion?
Can it skip newsletters and notifications?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Score CVs from email against your Notion job profiles
Each job application that arrives by email is scored against the matching role in Notion, with the result saved and emailed to you.
See how it worksTrack sponsorship offers from Gmail in Notion
Sponsorship and brand deal emails are spotted in your Gmail and added to your Notion deals board with brand, budget and deadline.
See how it worksSave labelled Gmail emails to Notion
Any email you label Notion in Gmail is saved as a page in your Notion database with its subject, sender and text.
See how it worksKeep exploring
Set up “Summarise and sort new emails into a Notion inbox” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.