Skip to content

On a schedule

Compare stock counts in Notion with Airtable every day

Each morning you get an email listing items where Notion and Airtable disagree and items that need reordering.

Runs
On a schedule
Apps
Airtable, Notion
AI
Optional
Access
read on both

Send this to your assistant

Create a ClickRuntime automation: every day at 7, compare item quantities in my Notion Stock Count database with my Airtable Inventory table by SKU, and email me mismatches and anything below its reorder level.

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

A small retailer counts stock on the shop floor into a Notion database, while the inventory used for online sales lives in Airtable. The two drift apart: a delivery is entered in one but not the other, a count is mistyped, and the website sells items that are no longer on the shelf.

A daily comparison by SKU catches those differences while they are small and still easy to explain. Low-stock items are listed in the same email, so reordering happens before you run out.

What you get out of it

  • Stop selling what you do not have

    Mismatches are caught within a day. Fixing the count before customers order avoids cancellations and refunds.

  • Errors are easier to trace

    A difference spotted the next morning can usually be explained by yesterday's deliveries or sales. After a month, nobody remembers what happened.

  • Reorder before you run out

    Items below their reorder level are listed every day. Suppliers get orders in time, rather than after a shelf is empty.

  • A quiet email when all is well

    If everything matches and nothing is low, the email says so in one line. You spend time only on days when something needs attention.

How it works

What happens, step by step

  1. Every morning, ClickRuntime reads the item counts from your Notion Stock Count database.

  2. It reads the quantities and reorder levels from your Airtable Inventory table.

  3. It matches the two by SKU and lists any differences, items found in only one place, and items below their reorder level. If AI is turned on, it adds short reorder suggestions.

  4. The list is emailed to you.

Before it runs live

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

What you get

RunsOn a schedule
Compare stock counts in Notion with Airtable every daytoday, 9:00Succeeded
Email · Stock checkStock check: 2 mismatches, 1 low. NW-1042: Notion 18 vs Airtable 24. CT-220: 3 left (reorder at 10).

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

  • Run it at a different time, more or less often, or only on weekdays
  • 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 Airtable and 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.
reconcile_inventory_between_notion_and_airtable.pyexample
from clickruntime import on_trigger, credentials, http, notify, ai

NOTION_DB, AIRTABLE_BASE, TABLE = "your-database-id", "appXXXXXXXX", "Inventory"

@on_trigger
def run(event):
    nh = {"Authorization": f"Bearer {credentials.connection('notion', 'work')}", "Notion-Version": "2022-06-28"}
    pages = http.post(f"https://api.notion.com/v1/databases/{NOTION_DB}/query", headers=nh, json={"page_size": 100}).json()["results"]
    counted = {p["properties"]["SKU"]["rich_text"][0]["plain_text"]: p["properties"]["Count"]["number"] for p in pages if p["properties"]["SKU"]["rich_text"]}
    recs = http.get(f"https://api.airtable.com/v0/{AIRTABLE_BASE}/{TABLE}", headers={"Authorization": f"Bearer {credentials.secret('AIRTABLE_TOKEN')}"}).json()["records"]
    inv = {r["fields"]["SKU"]: r["fields"] for r in recs if "SKU" in r["fields"]}
    lines = [f"{s}: Notion {counted.get(s)} vs Airtable {inv.get(s, {}).get('Quantity')}" for s in sorted(set(counted) | set(inv))
             if counted.get(s) != inv.get(s, {}).get("Quantity")]
    low = [f"{s}: {f.get('Quantity')} left (reorder at {f['Reorder level']})" for s, f in inv.items()
           if "Reorder level" in f and (f.get("Quantity") or 0) < f["Reorder level"]]
    text = "Mismatches:\n" + ("\n".join(lines) or "None") + "\n\nBelow reorder level:\n" + ("\n".join(low) or "None")
    if low:
        try:
            text += "\n\nSuggestions:\n" + ai.generate("Suggest reorder priorities briefly:\n" + "\n".join(low), max_output_tokens=200).text
        except ai.AIError:
            pass
    notify.email_me(f"Stock check: {len(lines)} mismatches, {len(low)} low", text)
    return {"mismatches": len(lines), "low": len(low)}

FAQ

Common questions

How are items matched between the two?
By SKU. Both the Notion database and the Airtable table need a SKU field, and items found in only one of them are listed separately.
Where does the reorder level come from?
From a reorder level field on each Airtable record. Items without one are compared for mismatches but not checked for low stock.
Can it post to Slack instead of email?
Yes. The same report can be posted to a Slack channel, such as #stock, so the whole team sees it.
What permissions does it need?
read on both. Nothing else in your accounts is used.
Does it need AI?
No, but you can ask for an AI step (for example a summary). It then uses ClickRuntime's built-in AI allowance.
How many runs does it use?
One run each time it runs (on a schedule). Checks that find nothing to do 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 “Compare stock counts in Notion with Airtable every day” from your assistant

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