Skip to content

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.

Paste it into your assistant. It tells you what it will send or change before it runs live.

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

  1. Every 10 minutes, ClickRuntime looks in your Gmail for emails with the Notion label.

  2. For each one, it reads the subject, sender, date and text.

  3. It creates a page in your Notion database with those details and a link back to the email.

  4. 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

RunsEvery 10 minutes
Save labelled Gmail emails to Notiontoday, 9:00Succeeded
Notion · InboxNew page: "Feature request: bulk export" from ops@contoso.example, saved from Gmail.

Build your own

Need it to work differently?

This template is a starting point. Copy the prompt and change it, or describe a different automation from scratch, with your own conditions, more apps or an AI step. Your assistant writes it, tests it and runs it on ClickRuntime.
  • 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

This is the Python script that runs each time the automation starts. Your AI assistant writes it for you when you send the prompt, and you allow each step in your assistant. To change how the automation works, describe the change to your assistant and it updates the script for you. For every function it can use, see the script reference.
labelled_emails_saved_to_a_notion_database.pyexample
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?
A title property for the subject plus text properties for the sender and date. The email body is added as the content of the page, so long emails stay readable.
Are attachments saved?
No, only the subject, sender, date and text. The page includes a link back to the email in Gmail, so attachments are a click away.
Can I use a different label name?
Yes. Any Gmail label works, and you can use several labels to save emails to different Notion databases, such as one for feedback and one for invoices.
What permissions does it need?
Gmail gmail.modify (or readonly); Notion insert. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's AI allowance.
How many runs does it use?
One run each time it checks. Checks that find nothing new and stop right away aren't counted.
Can I change how it works?
Yes. Describe the change to your AI assistant, for example a different schedule, channel or filter. It updates the automation, tests it and tells you what changed.

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.