Every 10 minutes
Save 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.
- Runs
- Every 10 minutes
- Apps
- Gmail, Notion
- AI
- Not needed
- Access
- Gmail gmail.modify (or readonly); Notion insert
Send this to your assistant
Create a ClickRuntime automation: every 10 minutes, save each email I've labelled Notion in Gmail to my Notion database with its subject, sender and body, then remove the label.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
A product manager at a software company gets feature requests, partner updates and useful customer stories by email. She plans her work in Notion, so anything worth keeping has to be copied across by hand, which means most of it stays buried in the inbox.
Applying a Gmail label is a single click, and it is enough to get the email into the Notion database where the rest of the work lives. Product managers, researchers, founders and anyone who runs their projects in Notion use it to move the useful emails out of the inbox.
What you get out of it
One click to keep an email
You label the email in Gmail as you read it, on desktop or phone. There is no copying, pasting or switching apps.
Emails sit next to the related work
Saved emails appear as pages in your Notion database, where you can link them to projects, tag them and add notes. They become part of your planning, not a separate pile.
The team can see them
A Notion database is easy to share, unlike your inbox. Colleagues can read the customer request or partner update without it being forwarded.
The label clears itself
Once an email is saved, the label is removed. The label view only ever shows what is still waiting, and nothing is saved twice.
How it works
What happens, step by step
Every 10 minutes, ClickRuntime looks in your Gmail for emails with the Notion label.
For each one, it reads the subject, sender, date and text.
It creates a page in your Notion database with those details and a link back to the email.
The label is removed from the email, so it is not saved again.
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
- Add an AI step, for example to summarize, sort or draft a reply
- 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
import base64
from googleapiclient.discovery import build
from google.oauth2.credentials import Credentials
from clickruntime import on_trigger, credentials, http, report_fetched
LABEL_ID, DATABASE_ID = "Label_123", "your-database-id"
@on_trigger
def run(event):
gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False).users().messages()
msgs = gmail.list(userId="me", labelIds=[LABEL_ID]).execute().get("messages", [])
report_fetched(len(msgs))
if not msgs:
return {"summary": "Nothing new"}
for m in msgs:
full = gmail.get(userId="me", id=m["id"], format="full").execute()
hdr = {h["name"]: h["value"] for h in full["payload"]["headers"]}
part = next((p for p in full["payload"].get("parts", [full["payload"]]) if p["mimeType"] == "text/plain"), full["payload"])
body = base64.urlsafe_b64decode(part["body"].get("data", "") + "==").decode("utf-8", "ignore")[:1900] or full["snippet"]
http.post("https://api.notion.com/v1/pages", headers={"Authorization": f"Bearer {credentials.connection('notion', 'work')}",
"Notion-Version": "2022-06-28"}, json={"parent": {"database_id": DATABASE_ID}, "properties": {
"Name": {"title": [{"text": {"content": hdr.get("Subject", "(no subject)")[:200]}}]},
"From": {"rich_text": [{"text": {"content": hdr.get("From", "")}}]},
"Link": {"url": f"https://mail.google.com/mail/u/0/#all/{m['id']}"}},
"children": [{"paragraph": {"rich_text": [{"text": {"content": body}}]}}]}).raise_for_status()
gmail.modify(userId="me", id=m["id"], body={"removeLabelIds": [LABEL_ID]}).execute()
return {"saved": len(msgs)}
FAQ
Common questions
What does the Notion database need?
Are attachments saved?
Can I use a different label name?
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 worksSummarise 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.
See how it worksKeep exploring
Set up “Save labelled Gmail emails to Notion” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.