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.
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
Every 10 minutes, ClickRuntime checks Gmail for new messages it has not seen.
AI decides whether each email asks you to do something, and whether it is urgent.
Emails that need action become Google Tasks with a link back to the message.
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
Build your own
Need it to work differently?
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
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?
Does it read attachments?
Where do the Slack alerts go?
What permissions does it need?
Does it need AI?
How many runs does it use?
Can I change how it works?
Related
You might also like
Turn requests sent to a link into Google Tasks
Requests sent from a form or another tool become well-titled Google Tasks with a due date, and Slack confirms each one.
See how it worksTick off Google Tasks when a commit finishes them
When you push commits, tasks they finish are marked done in Google Tasks and Slack hears about it.
See how it worksTurn a meeting transcript into Slack minutes and Google Tasks
Send a meeting transcript and get tidy minutes in Slack, with each of your action items added to Google Tasks.
See how it worksKeep exploring
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.