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.
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
Every morning, ClickRuntime reads the item counts from your Notion Stock Count database.
It reads the quantities and reorder levels from your Airtable Inventory table.
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.
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
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
- 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
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?
Where does the reorder level come from?
Can it post to Slack instead of email?
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
Log calls or sales to both Airtable and Notion
Each time your call tool or store sends a record, it is added as a row in Airtable and a page in Notion with the same details.
See how it worksCreate a Notion onboarding page when an Airtable lead is won
When a lead is marked Won in your Airtable Clients table, an onboarding page with your checklist is created in Notion and linked back to the record.
See how it worksClassify developer questions into Notion and Airtable
Each question or error report sent to your trigger link is classified, written up as a Notion page, tracked as an Airtable record, and flagged in Slack when severe.
See how it worksKeep exploring
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.