Quick overview
This workflow runs every morning to read inventory levels from Google Sheets and post low-stock or out-of-stock alerts to a Slack channel, including supplier contact details, then updates the sheet to avoid repeating the same alert on the same day.
How it works
- Runs daily at the scheduled time.
- Reads all inventory rows from a Google Sheets document.
- Calculates each item’s stock status (healthy, low_stock, or out_of_stock) and checks whether it was already alerted today.
- Skips healthy items and anything already alerted today.
- Posts an urgent Slack message for out-of-stock items or a lower-urgency message for low-stock items, including supplier contact details.
- Updates the Google Sheets row to set
last_alert_date to today’s date so the item is not alerted again until the next day.
Setup
- Add Google Sheets OAuth2 credentials and set the Sheet ID and sheet name (default:
Inventory) in the configuration values.
- Add Slack credentials and set the target Slack channel ID in the configuration values.
- Ensure your Google Sheet includes the required columns:
row_id, item_name, current_stock, reorder_threshold, unit, supplier_name, supplier_contact, and last_alert_date.
- Adjust the schedule trigger time to match when you want the daily inventory check to run.