Flag low stock in NocoDB and draft supplier purchase orders

Every weekday morning, catch items that dropped below their reorder point, group them by supplier, and get review-ready purchase orders waiting in Gmail.

Agentic Task
NocoDBGmailSlack BotOperationsFinanceNotifications & AlertsEmail AutomationDaily Digests
PromptCreate

Every weekday at 8am, review my NocoDB inventory table and flag every item where stock on hand has fallen below its reorder point.

Use the NocoDB List Table Records operation to pull the inventory table, paging through every row rather than stopping at the first page. For each row, compare stock on hand against that item's own reorder point. Skip any item that is already marked as on order, so the same shortage is not chased twice.

Group the flagged items by supplier, and rank them by how urgent the shortfall is. Judge urgency by how far below the reorder point the item has fallen as a proportion of that reorder point, not by raw units, so a small item that is nearly out ranks above a large item that is only slightly short. If the table records a supplier lead time, let a long lead time push an item further up the ranking.

For each supplier that has at least one flagged item, use the Gmail Create a Draft operation to write a draft purchase order addressed to that supplier's contact email. Give it a subject line that identifies it as a purchase order with the supplier name and today's date. In the body, list each item with its identifier or SKU, current stock on hand, reorder point, and a suggested order quantity that brings it comfortably back above the reorder point. Create these as drafts only and never send them. Purchase orders commit money, so I review and send each one myself.

Then post one consolidated message to my operations channel using the Slack Send a Message operation. Include how many items were flagged, how many suppliers are affected, the handful of most urgent items by name, and a note that the drafts are waiting in Gmail for review. Send a single summary message, not one message per supplier. If an item was flagged but has no supplier or no contact email, call it out separately so it does not get lost.

Finally, use the NocoDB Update Table Records operation to set a "Reorder flagged" status and today's date on each flagged row. Only update rows that were actually flagged in this run. If a supplier's Gmail draft could not be created, say so in the Slack message and leave those rows unflagged, so the next morning's run picks them up again.

If nothing is below its reorder point, create no drafts and post a single short all clear line to the operations channel so I know the check ran.

What does this prompt do?

  • Checks your NocoDB inventory table every weekday morning and flags every item whose stock on hand has fallen below its reorder point.
  • Groups the shortfalls by supplier and ranks them by urgency, so the items closest to running out are the ones you see first.
  • Writes a ready-to-review purchase order draft in Gmail for each supplier, listing their items and suggested quantities. Nothing is ever sent automatically.
  • Posts one consolidated Slack summary to your operations channel and marks each flagged row in NocoDB, so the same shortage is never chased twice.

What do I need to use this?

  • A NocoDB account, either Cloud or self-hosted, with an inventory table that tracks stock on hand and a reorder point for each item.
  • A supplier name on each item, plus a contact email address you want the purchase order addressed to.
  • A Gmail account where the draft purchase orders will be created.
  • A Slack workspace and the operations channel where the summary should be posted.
  • A status field on the inventory table that the workflow can write to, so items already on order get skipped.

How can I customize it?

  • Change the schedule. Run it every weekday at 8am, once a week, or twice a day during a busy season.
  • Adjust how urgency is ranked, for example weighting long supplier lead times or fast-moving items above the raw size of the shortfall.
  • Change where the summary lands, such as a different Slack channel or a direct message to whoever owns purchasing that week.

FAQs

Will this email my suppliers automatically?
No. Every purchase order is created as a draft in your Gmail account and left there. Nothing is sent until you open it, check it, and press send yourself. Purchase orders commit money, so a human always approves them.
Does this work with self-hosted NocoDB?
Yes. It works with both NocoDB Cloud and a self-hosted install. You just point it at the web address where your NocoDB lives.
What stops it from ordering the same thing twice?
Two things. It skips any item already marked as on order, and after each run it stamps the flagged rows with a reorder status and the date. The next morning those items are recognized as already handled.
What if an item does not have a supplier listed?
It still gets flagged and still appears in the Slack summary, grouped as unassigned, so it does not quietly disappear. No draft can be created for it until you add a supplier and contact email.
Do my columns need specific names?
No. It reads your existing table and works with the field names you already use, as long as there is something representing stock on hand and something representing the reorder point.

Related templates

Build a credential rotation checklist when someone leaves

When someone leaves, we check which shared passwords they used in their final months and post a ranked rotation list to your security channel.

1Password
Rippling
Slack Bot
+1
Agentic Task
Trace phishing emails to the sending IP and report abuse

Every 15 minutes, forwarded phishing reports get traced back to the server that really sent them, with a verdict in Slack and the worst senders reported.

AbuseIPDB
Gmail
Slack
Agentic Task
Weekly Amazon S3 bucket security audit posted to Slack

Every Monday, check every S3 bucket for public exposure, missing encryption and weak backup settings, then get the risks ranked in Slack.

Amazon S3
Slack Bot
Google Sheets
Agentic Task
Log Agorapulse social conversations to HubSpot contacts

Twice every weekday, the conversations from your social inbox land on the right HubSpot contact timelines, with a Slack recap for sales.

Agorapulse
HubSpot
Slack Bot
Agentic Task
Clean up HubSpot contacts from your Amazon SES suppression list

Every morning, find the addresses that hard bounced or filed a spam complaint, update the matching HubSpot contacts, and post a short Slack recap.

Amazon SES
HubSpot
Slack Bot
Agentic Task
Draft polite follow-ups for emails that never got a reply

Every weekday at 4pm, spot the threads that went quiet, stage a ready-to-send nudge in your mailbox, and get a ranked Slack recap.

Aurinko
Google Sheets
Slack Bot
Agentic Task

Stop finding out you are out of stock too late.

Let this run every weekday morning so shortfalls surface with the purchase orders already drafted and waiting for your approval.