Skip to content
NEWMarketplace and your team: sell what you build, and get plans and changes that are tested before you see them. See what is new

Library / Monitoring, Ops & Incidents

Monitoring, Ops & Incidents

Triage pharmacy expiry actions with Sheets, Slack, Gmail and Gemini

Runs each morning to flag inventory batches nearing expiry, has Gemini draft a pharmacist briefing for Slack approval, then executes approved sheet updates and emails.

What it does

## 💊 Pharmacy Expiry Cascade ### How it works This workflow runs every morning to read pharmacy inventory, sales, branch stock, and supplier policy data from Google Sheets, then calculates which batches are approaching expiry. It packages recommended actions, uses Gemini to create a pharmacist-facing briefing, and sends it to Slack for approval. Approved actions are logged, routed, and executed through sheet updates, branch or supplier emails, and compliance alerts. ### Setup steps - Configure Google Sheets credentials and set the correct sheet_id in the Config node, ensuring the inventory, sales log, branch stock, supplier policies, decision log, reorder, and batch status sheets/tabs have the expected columns. - Configure Slack credentials, the slack_channel_id, and any Slack interactivity/approval settings needed for the Pharmacist Approval and Compliance Alert nodes. - Configure Google Gemini credentials for the Gemini Chat Model used by the Pharmacist Briefing chain. - Configure Gmail credentials for the branch and supplier email nodes, and set email_override if test routing or a fixed recipient is required. - Review the Daily 6AM schedule timezone and set horizon_days to the desired expiry look-ahead window. ### Customization Adjust horizon_days, supplier policy fields, approval text, routing rules, and the email/Slack message templates to match the pharmacy’s operating procedures and escalation thresholds. @youtube

The steps

  1. When Scheduled Daily at 6AM
  2. Set Configuration Parameters
  3. Read Inventory from Sheets
  4. Read Sales Log from Sheets
  5. Read Branch Stock from Sheets
  6. Read Supplier Policies from Sheets
  7. Calculate Expiry Decisions
  8. Aggregate Expiry Actions
  9. Prepare Pharmacist Briefing
  10. Send Approval Request via Slack
  11. Set Decision Fields
  12. Split Action List
  13. Append Decision to Sheets
  14. Check Approval Status

22 steps in total.

Similar automations