Off Prompt

AI Tools for Small Business

Operations

Google Apps Script Email Alert for Low Stock Items

Use this prompt to generate the Google Apps Script code that sends a daily email alert listing any SKUs at or below their reorder point. Replace [your email address] with your actual email before pasting the returned code into the Apps Script editor.

The Prompt

Write a Google Apps Script function for a Google Sheet named "Inventory Reorder Tracker." The sheet has columns in this order: A = SKU Name, B = Current Stock, E = Reorder Point, F = Alert Status. The function should: (1) loop through all rows with data starting at row 2, (2) check if the value in column B is less than or equal to the value in column E, (3) if true, collect those SKU names and stock levels, and (4) send a single summary email to [your email address] with a list of all items needing reorder. Include a trigger setup so this runs every morning at 8am.

From the guide

Using AI to build a simple inventory reorder alert system from your spreadsheet so you stop running out of stock at the worst time →

Related Prompts