Skip to content

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.

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

  1. Every hour, ClickRuntime checks your Gmail for emails that arrived since the last check.

  2. Emails already added are skipped, so each appears in Notion once.

  3. AI writes a one-line summary, picks a category and suggests a next action for each email.

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

RunsEvery hour
Summarise and sort new emails into a Notion inboxtoday, 9:00Succeeded
Notion · InboxCustomer · Northwind asks to move Thursday's onboarding call. Next action: offer two new slots.

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
  • 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

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.
ai_email_summaries_and_classification_into_notion.pyexample
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?
You choose the list, for example Customer, Finance, Partner, Newsletter and Other. Each email gets exactly one of them.
Is the full email copied into Notion?
Only the sender, subject, summary, category and a link back to Gmail are stored. The body stays in your mailbox.
Can it skip newsletters and notifications?
Yes. Emails from senders or labels you list can be left out before anything is summarised.
What permissions does it need?
Gmail gmail.readonly; Notion insert. Nothing else in your accounts is used.
Does it need AI?
Yes. It uses ClickRuntime's built-in AI, so you don't need an OpenAI or Anthropic key. Every plan includes a monthly 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 “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.