Skip to content

Every 10 minutes

Turn action emails into Google Tasks and flag urgent ones in Slack

Emails asking you to do something become Google Tasks, and the urgent ones also reach you in Slack.

Runs
Every 10 minutes
Apps
Google Tasks, Slack
AI
Yes, uses the built-in AI allowance
Access
tasks; chat:write

Send this to your assistant

Create a ClickRuntime automation: every 10 minutes, read my new Gmail, create a Google Task for any email that asks me to do something, and message me in Slack about the urgent ones.

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

When you live in Slack all day, email gets checked in bursts. A request that needed an answer by noon gets read at four, and an ask buried in a long thread never makes it to a list.

Account managers, operations staff and founders use it so every request in email becomes a task, and the few that cannot wait reach them where they are already working.

What you get out of it

  • Requests never stay buried

    Every email that asks for something becomes a Google Task, whether or not you have opened it yet.

  • Urgent things find you

    Only urgent requests are sent to Slack, so the alert means something when it arrives.

  • Less inbox checking

    Knowing urgent mail will reach you makes it easier to close the inbox and get on with other work.

  • Each email handled once

    Messages already processed are remembered, so nothing creates two tasks.

How it works

What happens, step by step

  1. Every 10 minutes, ClickRuntime checks Gmail for new messages it has not seen.

  2. AI decides whether each email asks you to do something, and whether it is urgent.

  3. Emails that need action become Google Tasks with a link back to the message.

  4. Urgent ones are also posted to your Slack channel.

Before it runs live

  • Connect Google Tasks
  • Connect Slack, then invite the app to the channel (type /invite @ClickRuntime there)

What you get

RunsEvery 10 minutes
Turn action emails into Google Tasks and flag urgent ones in Slacktoday, 9:00Succeeded
Slack · #urgent🚨 Confirm delivery address for Northwind order today (from ops@northwind.example)

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

SCHEMA = {"type": "object", "properties": {"action": {"type": "boolean"}, "urgent": {"type": "boolean"}, "task": {"type": "string"}}}

@on_trigger
def run(event):
    creds = Credentials(credentials.connection("google", "work"))
    gmail = build("gmail", "v1", credentials=creds, cache_discovery=False).users().messages()
    done = set(state.get("done") or [])
    new = [m for m in gmail.list(userId="me", q="in:inbox newer_than:1d").execute().get("messages", []) if m["id"] not in done]
    report_fetched(len(new))
    if not new:
        return {"new": 0}
    tasks = build("tasks", "v1", credentials=creds, cache_discovery=False).tasks()
    for m in new:
        msg = gmail.get(userId="me", id=m["id"], format="metadata", metadataHeaders=["From", "Subject"]).execute()
        h = {x["name"]: x["value"] for x in msg["payload"]["headers"]}
        out = ai.generate(f"Does this email ask me to do something? Is it urgent? If action, give a short task title.\n"
                          f"From: {h.get('From')}\nSubject: {h.get('Subject')}\n{msg['snippet']}",
                          json_schema=SCHEMA, max_output_tokens=80).json
        link = f"https://mail.google.com/mail/u/0/#all/{m['id']}"
        if out["action"]:
            tasks.insert(tasklist="@default", body={"title": out["task"], "notes": f"From {h.get('From')}\n{link}"}).execute()
        if out["action"] and out["urgent"]:
            notify.slack(f"🚨 {out['task']} (from {h.get('From')})\n{link}", channel="#urgent")
    state.set("done", sorted(done | {m["id"] for m in new})[-1000:])
    return {"processed": len(new)}

FAQ

Common questions

What counts as urgent?
An email with a near deadline, a customer problem or wording that asks for a same-day answer. You can give your AI assistant your own rules, such as anything from a named client.
Does it read attachments?
No. It reads the sender, subject and opening text of each email.
Where do the Slack alerts go?
To the channel you choose, such as a private #urgent channel only you are in.
What permissions does it need?
tasks; 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 “Turn action emails into Google Tasks and flag urgent ones in Slack” from your assistant

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