Skip to content

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.

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

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

  1. Every 15 minutes, ClickRuntime checks Gmail for messages that arrived since the last check.

  2. AI reads each one and lists any tasks, with an owner and due date where mentioned.

  3. Each task is added as a row to your Supabase tasks table, with the email's ID.

  4. 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

RunsEvery 15 minutes
Turn action items in your email into Supabase taskstoday, 9:00Succeeded
Supabase · tasksSend revised proposal to Acme · owner: Priya · due 2026-10-24 · email 18f3c…

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 Supabase 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.
extract_tasks_from_emails_into_supabase.pyexample
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?
New messages in your inbox, excluding newsletters and automated mail if you set a search to filter them.
What if an email has no tasks?
Nothing is added. Only clear requests or commitments become tasks.
What columns does the tasks table need?
A title, an owner, a due date and a column for the email ID. Tell your AI assistant your column names if they differ.
What permissions does it need?
Gmail readonly; Supabase 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 items in your email into Supabase tasks” from your assistant

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