Every 15 minutes
Turn action items in your email into Supabase tasks
Every 15 minutes, tasks mentioned in your new emails, with owners and due dates, are added as rows in your Supabase tasks table.
- Runs
- Every 15 minutes
- Apps
- Gmail, Supabase
- AI
- Yes, uses the built-in AI allowance
- Access
- Gmail readonly; Supabase write
Send this to your assistant
Create a ClickRuntime automation: every 15 minutes, read my new Gmail messages, pull out any tasks with due dates and owners, and insert them into my Supabase tasks table with the email's ID.
First time? Adding ClickRuntime to your assistant takes about two minutes.
Why use it
Why teams use this automation
Much of a team's to-do list arrives by email: 'can you send the proposal by Friday?', 'please update the figures before the board meeting'. Those requests stay buried in threads, and the team's own task app, built on Supabase, never hears about them.
Pulling action items out of each new email and adding them to the tasks table means requests are tracked where the team already works, with a link back to the email they came from.
What you get out of it
Requests don't get lost
Asks buried in long threads become tasks you can see and tick off.
Due dates are captured
Deadlines mentioned in passing become dates in the table.
Linked to the source
Each task keeps the email ID, so you can open the original message.
Works with your own app
Tasks land in your own Supabase table, ready for whatever app or view you've built on it.
How it works
What happens, step by step
Every 15 minutes, ClickRuntime checks Gmail for messages that arrived since the last check.
AI reads each one and lists any tasks, with an owner and due date where mentioned.
Each task is added as a row to your Supabase tasks table, with the email's ID.
It remembers the last check time, so no email is read twice.
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 Supabase
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 Slack
- Combine it with other Gmail and Supabase 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, credentials, http, state, ai, report_fetched
SUPABASE = "https://your-project.supabase.co/rest/v1"
def sb(method, path, **kw):
key = credentials.secret("SUPABASE_KEY")
r = http.request(method, f"{SUPABASE}/{path}", **kw, headers={"apikey": key, "Authorization": f"Bearer {key}", "Prefer": "return=representation,resolution=merge-duplicates"})
return r.raise_for_status() or (r.json() if r.content else None)
SCHEMA = {"type": "object", "properties": {"tasks": {"type": "array", "items": {"type": "object", "properties": {
"title": {"type": "string"}, "owner": {"type": "string"}, "due": {"type": "string"}}}}}}
@on_trigger
def run(event):
gmail, since = build("gmail", "v1", credentials=Credentials(credentials.connection("google", "work")), cache_discovery=False), state.get("since") or 0
q = f"in:inbox -category:promotions after:{since}" if since else "in:inbox newer_than:1h"
msgs = gmail.users().messages().list(userId="me", q=q).execute().get("messages", [])
report_fetched(len(msgs))
if not msgs:
return {"summary": "Nothing new"}
rows, newest = [], since
for m in msgs:
full = gmail.users().messages().get(userId="me", id=m["id"]).execute()
newest = max(newest, int(full["internalDate"]) // 1000)
found = ai.generate(f"List tasks (title, owner, due YYYY-MM-DD or empty) in this email, or none:\n{full['snippet']}", json_schema=SCHEMA, max_output_tokens=300).json
rows += [{**t, "due": t.get("due") or None, "email_id": m["id"]} for t in found.get("tasks", [])]
if rows:
sb("POST", "tasks", json=rows)
state.set("since", newest + 1)
return {"emails": len(msgs), "tasks": len(rows)}FAQ
Common questions
Which emails are read?
What if an email has no tasks?
What columns does the tasks table need?
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
Draft support replies in Gmail from your Supabase knowledge base
New support emails get a draft reply in Gmail based on answers stored in your Supabase knowledge table, and replies you send are saved back as new knowledge.
See how it worksReply to quote requests with prices from your Supabase products
Quote requests in your inbox get a reply priced from your Supabase product table, and every quote is logged.
See how it worksScreen emailed CVs into a Supabase candidates table
CVs sent to your hiring inbox are read, summarised and scored against the role, and each candidate is added to your Supabase table.
See how it worksKeep exploring
Set up “Turn action items in your email into Supabase tasks” from your assistant
Copy the prompt above, or connect your assistant first. Free plan, no credit card.