Skip to content

Every 5 minutes

Get your important emails in Slack

New mail is sorted and labelled for you, and the urgent ones are posted to Slack with a one-line summary.

Runs
Every 5 minutes
Apps
Gmail, Slack
AI
Yes, uses the built-in AI allowance
Access
Gmail gmail.modify; Slack chat:write

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, sort my new emails into urgent, client, invoice or newsletter, add a matching Gmail label, and post the urgent ones to me in Slack with a one-line summary.

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 busy founder or account manager gets a hundred emails a day, and perhaps eight of them matter: a customer reporting an outage, a contract question from legal, a payment problem. The rest are newsletters, receipts and notifications. Reading everything to find the eight takes an hour, and the one urgent email still gets missed because it arrived in a stack of promotions at 4:55pm.

Every 5 minutes new Gmail messages come in, and the built-in AI in ClickRuntime assigns a category and writes a one-line summary. A matching label is applied in Gmail, and only the messages judged important are posted to Slack with the sender, the summary and a link, so the channel shows what deserves attention now.

It works well for people who live in Slack but still receive mission-critical mail in Gmail, such as founders and customer-facing managers. It is also handy for people who share an inbox with an assistant.

What you get out of it

  • Urgent mail reaches you in minutes

    An angry customer or a failing payment surfaces in Slack as soon as it lands, so you can answer before the problem gets worse or the customer starts looking at competitors.

  • Your inbox sorts itself

    Category labels in Gmail mean you can open Invoices or Customers and see only what belongs there, which makes later searching faster and weekly cleanups almost trivial. Later searches and clean-ups become far quicker as a result.

  • One-line summaries save reading time

    Seeing the gist in the Slack message lets you decide in five seconds whether to deal with an email now or later, without opening it and losing your train of thought.

  • Less low-value checking of email

    When you trust that important messages will appear in Slack, you stop refreshing the inbox every few minutes, which gives back focus time across the whole day. Fewer inbox refreshes mean longer stretches of deep, uninterrupted work.

  • No AI account to set up

    Classification and summaries use ClickRuntime's built-in AI, so there is nothing to purchase or configure on the AI side before the sorting begins. Getting started takes a few minutes of conversation with your assistant.

How it works

What happens, step by step

  1. Every 5 minutes, ClickRuntime checks your Gmail inbox for new messages, skipping any it has already sorted.

  2. AI reads each one, sorts it as urgent, client, invoice or newsletter, and writes a one-line summary.

  3. The matching label is added to the email in Gmail.

  4. Urgent emails are also posted to your #me Slack channel with the sender and summary.

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 Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsEvery 5 minutes
Get your important emails in Slacktoday, 9:00Succeeded
Slack · #me🚨 Jordan at Northwind <jordan@northwind.example>: Contract needs your signature before 3pm today

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 Google Sheets
  • Combine it with other Gmail and Slack 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_inbox_triage_with_slack_alerts.pyexample
from google.oauth2.credentials import Credentials
from googleapiclient.discovery import build
from clickruntime import on_trigger, credentials, state, ai, notify, report_fetched

LABELS = ["urgent", "client", "invoice", "newsletter"]

@on_trigger
def run(event):
    gmail = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False)
    seen = set(state.get("seen") or [])
    msgs = gmail.users().messages().list(userId="me", q="in:inbox newer_than:1d", maxResults=25).execute().get("messages", [])
    new = [m for m in msgs if m["id"] not in seen]
    report_fetched(len(new))
    if not new:
        return {"new": 0}
    label_ids = {l["name"]: l["id"] for l in gmail.users().labels().list(userId="me").execute()["labels"]}
    for m in new:
        msg = gmail.users().messages().get(userId="me", id=m["id"], format="metadata",
                                           metadataHeaders=["From", "Subject"]).execute()
        h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
        r = ai.generate(f"From: {h.get('From')}\nSubject: {h.get('Subject')}\n{msg['snippet']}", max_output_tokens=60,
                        json_schema={"type": "object", "properties": {"category": {"enum": LABELS}, "summary": {"type": "string"}}}).json
        if r["category"] in label_ids:
            gmail.users().messages().modify(userId="me", id=m["id"], body={"addLabelIds": [label_ids[r["category"]]]}).execute()
        if r["category"] == "urgent":
            notify.slack(f"🚨 {h.get('From')}: {r['summary']}", channel="#me")
    state.set("seen", [m["id"] for m in msgs])
    return {"triaged": len(new)}

FAQ

Common questions

How does it decide which emails are important?
The AI reads the sender, subject and body, and judges against criteria you give, such as customers, payments or legal. You can describe your own definition of important, and the message is posted only when it matches.
Does it read every email in my Gmail?
It reads new messages that arrive after it starts, using the Gmail permissions you grant. You can limit it to the inbox or to certain labels, and you can exclude senders you never want processed.
Will it archive or delete emails?
No. It adds labels and posts to Slack, nothing more. Your messages stay in the inbox exactly where they arrived, so nothing is moved or removed without your own action. Your mail remains exactly where it was.
What permissions does it need?
Gmail gmail.modify; Slack chat:write. 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 “Get your important emails in Slack” from your assistant

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