Skip to content

Every 30 minutes

Triage your Gmail and Outlook inboxes with one digest

Both inboxes are sorted into the same categories, and you get one digest of the emails that need you.

Runs
Every 30 minutes
Apps
Gmail, Outlook
AI
Yes, uses the built-in AI allowance
Access
gmail.modify; Mail.ReadWrite

Send this to your assistant

Create a ClickRuntime automation: every 30 minutes, read new emails in my Gmail and my Outlook. Use AI to sort each into needs reply, FYI, newsletter or ignore, apply that as a Gmail label or Outlook category, and email me one digest of the ones that need a reply.

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 consultant works for two clients, one on Google Workspace and one on Microsoft 365, and has their own business Gmail too. Switching between inboxes all day means emails that need a reply get buried in one while they are busy in the other.

Sorting both inboxes the same way and sending one digest of what needs a reply gives a single list to work from, wherever the email arrived.

What you get out of it

  • One list, two inboxes

    The digest shows everything that needs a reply, from both mailboxes.

  • The same categories everywhere

    Gmail labels and Outlook categories match, so filtering works the same way in both.

  • Newsletters out of the way

    Bulk mail is labelled so it can be skimmed later.

  • Nothing moved or deleted

    Emails stay in their inboxes; only a label or category is added.

How it works

What happens, step by step

  1. Every 30 minutes, ClickRuntime collects new emails from your Gmail and your Outlook inbox.

  2. AI sorts each one into needs reply, FYI, newsletter or ignore.

  3. The category is added as a Gmail label or an Outlook category.

  4. If any need a reply, you get one email listing them, with the mailbox each came from.

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 Outlook

What you get

RunsEvery 30 minutes
Triage your Gmail and Outlook inboxes with one digesttoday, 9:00Succeeded
Email · Needs a reply3 emails need a reply [outlook] Acme Holdings: can we move the workshop to Thursday? [gmail] Northwind: quote for the Q1 retainer

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 Outlook 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.
one_ai_triage_across_gmail_and_outlook.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, report_fetched, http, credentials, ai, state, notify

api = lambda name, version: build(name, version, credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)

def graph(method, path, **kw):
    r = http.request(method, "https://graph.microsoft.com/v1.0" + path, headers={"Authorization": f"Bearer {credentials.connection('microsoft', 'work')}"}, **kw)
    return r.raise_for_status() or (r.json() if r.content else None)

LABELS = {"needs_reply": "Label_1", "fyi": "Label_2", "newsletter": "Label_3", "ignore": "Label_4"}  # your Gmail label ids

@on_trigger
def run(event):
    gmail, seen, since = api("gmail", "v1").users().messages(), set(state.get("seen") or []), state.get("since") or "2026-01-01T00:00:00Z"
    items = [("gmail", m["id"], gmail.get(userId="me", id=m["id"], format="metadata").execute()["snippet"])
             for m in gmail.list(userId="me", q="in:inbox newer_than:1d").execute().get("messages", []) if m["id"] not in seen]
    out = graph("GET", "/me/mailFolders/inbox/messages", params={"$filter": f"receivedDateTime gt {since}", "$select": "id,subject,bodyPreview,receivedDateTime"})["value"]
    items += [("outlook", m["id"], f"{m['subject']}: {m['bodyPreview']}") for m in out]
    report_fetched(len(items))
    if not items:
        return {"summary": "Nothing new"}
    labels = ai.generate("\n".join(f"{i}. {t[:300]}" for i, (_, _, t) in enumerate(items)), system="Label each line needs_reply, fyi, newsletter or ignore.",
                         json_schema={"type": "object", "properties": {"labels": {"type": "array", "items": {"enum": list(LABELS)}}}}, max_output_tokens=400).json["labels"]
    todo = []
    for (box, mid, text), label in zip(items, labels):
        if box == "gmail":
            gmail.modify(userId="me", id=mid, body={"addLabelIds": [LABELS[label]]}).execute()
            seen.add(mid)
        else:
            graph("PATCH", f"/me/messages/{mid}", json={"categories": [label.replace("_", " ").title()]})
        if label == "needs_reply":
            todo.append(f"[{box}] {text[:120]}")
    if todo:
        notify.email_me(f"{len(todo)} emails need a reply", "\n".join(todo))
    state.set("seen", sorted(seen)[-3000:])
    state.set("since", max([since] + [m["receivedDateTime"] for m in out]))
    return {"sorted": len(items), "needs_reply": len(todo)}

FAQ

Common questions

How often does the digest arrive?
Every 30 minutes, but only when there is something that needs a reply.
Can I change the categories?
Yes. Describe your own categories in the prompt, and matching labels and categories are used.
Does it reply for me?
No. It sorts and lists; you reply from the right mailbox yourself.
What permissions does it need?
gmail.modify; Mail.ReadWrite. 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 “Triage your Gmail and Outlook inboxes with one digest” from your assistant

Copy the prompt above, or connect your assistant first. Free plan, no credit card.