Skip to content

Every 5 minutes

Get alerts when a Notion value goes out of range

When a reading or metric in your database passes your limit, you hear about it once, not on every check.

Runs
Every 5 minutes
Apps
Notion
AI
Not needed
Access
read

Send this to your assistant

Create a ClickRuntime automation: every 5 minutes, check my Notion Machines database and post to #maintenance in Slack any row where Temperature is above 80 and Acknowledged isn't ticked. Only alert once per row.

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

People use Notion to keep readings and counts that matter: stock levels in a small shop, temperature logs for a food business, student attendance, server costs entered weekly, a budget remaining per project. The numbers sit in a table and nothing reacts when one goes wrong. A fridge reading of 9 degrees is logged at noon and nobody looks until the next morning, by which time the stock has been in the danger zone for hours.

Every five minutes ClickRuntime queries your Notion database with a number filter, such as Temperature greater than 8, and skips records whose IDs it has already alerted on. For each new match it posts an alert with the record's details and remembers the ID, so the same reading does not trigger repeated messages.

Small businesses, labs and schools that keep operational logs in Notion use it as a simple safety net.

What you get out of it

  • Out-of-range values are acted on promptly

    A bad reading triggers a message within minutes of being logged. Moving stock to another fridge that afternoon is far cheaper than discarding it the next day. Moving stock to another fridge that afternoon costs far less than discarding it the next morning.

  • Thresholds are written once and enforced always

    The limit lives in the query, so everyone applies the same rule. Nobody has to remember that 8 is the cutoff when they enter the number. Nobody has to remember the cutoff when they type the number into the table.

  • Each reading alerts only once

    Remembered IDs mean a single bad record does not produce an alert every five minutes. The channel stays readable, and a new alert signals a genuinely new problem. The channel stays readable, and a new alert signals a genuinely new problem.

  • A record shows what was done

    The alert and the original row stay as evidence. In a food safety inspection, you can show when a reading was out of range and when someone responded. That helps in food safety inspections, insurance questions and incident reviews alike.

  • Works for any numeric property

    Stock below reorder level, budget remaining under 10 percent, scores under a pass mark: all follow the same pattern. One approach covers many kinds of monitoring in a workspace. One approach covers many kinds of monitoring across the same workspace.

How it works

What happens, step by step

  1. Every 5 minutes ClickRuntime checks your Notion database for values over your limit, such as a machine temperature above 80°C.

  2. It skips anything it has already alerted on.

  3. Each new alert is posted to your Slack channel with the item, the value and a link to its Notion page.

Before it runs live

  • Connect Notion and share the database you want it to use

What you get

RunsEvery 5 minutes
Get alerts when a Notion value goes out of rangetoday, 9:00Succeeded
Slack · #maintenance🌡️ Press line 3 is at 86°C https://www.notion.so/Press-line-3-1a2b3c

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
  • Add an AI step, for example to summarize, sort or draft a reply
  • Add another app, for example also send it to Slack
  • Combine it with other Notion 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.
alert_when_a_database_value_crosses_a_threshold.pyexample
from clickruntime import on_trigger, report_fetched, credentials, http, state, notify

NOTION = "https://api.notion.com/v1"

def headers():
    return {"Authorization": f"Bearer {credentials.secret('NOTION_TOKEN')}", "Notion-Version": "2022-06-28"}

def query(db, body=None):
    resp = http.post(f"{NOTION}/databases/{db}/query", headers=headers(), json=body or {})
    resp.raise_for_status()
    return resp.json()["results"]

def title(page, prop="Name"):
    return "".join(t["plain_text"] for t in page["properties"][prop]["title"])

MACHINES = "machines-database-id"

@on_trigger
def run(event):
    rows = query(MACHINES, {"filter": {"and": [
        {"property": "Temperature", "number": {"greater_than": 80}},
        {"property": "Acknowledged", "checkbox": {"equals": False}}]}})
    alerted = set(state.get("alerted") or [])
    new = [r for r in rows if r["id"] not in alerted]
    report_fetched(len(new))
    if not new:
        return {"summary": "Nothing new"}
    for r in new:
        temp = r["properties"]["Temperature"]["number"]
        notify.slack(f":thermometer: {title(r)} is at {temp}°C\n{r['url']}", channel="#maintenance")
    state.set("alerted", sorted(alerted | {r["id"] for r in new}))
    return {"alerted": len(new)}

FAQ

Common questions

Where are the alerts posted?
To Slack, email or both, as you choose. A shop might use a Slack message to the manager, while a school might email the coordinator. The alert includes the record title, value and a link to the Notion page.
Can the threshold depend on the record?
Yes, if each row has its own limit in another property, such as Reorder level. The automation can compare the value with that property instead of using one fixed number for every row. That makes limits per item easy to keep in the table.
What if a value is corrected later?
If the number is edited and is still over the limit, no second alert is sent for the same record. If you want a new alert after correction and relapse, you can clear the remembered ID when the value returns to normal.
What permissions does it need?
read. Nothing else in your accounts is used.
Does it need AI?
No. It runs without AI, so it doesn't use your plan's 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 alerts when a Notion value goes out of range” from your assistant

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