Triage pharmacy expiry actions with Google Sheets, Slack, Gmail and Gemini
Ready for 3.0What this workflow does
This AI workflow has 22 nodes and runs on a schedule (every day at 06:00). Along the way it connects Google Sheets, Slack, Gmail and Google Gemini Chat Model.
How it runs
Trigger: On a schedule (every day at 06:00).
- Set Configuration Parameters (Edit Fields (Set)): sets 9 fields: sheet_id, slack_channel_id, email_override…
- Read Inventory from Sheets (Google Sheets): uses Google Sheets
- Read Sales Log from Sheets (Google Sheets): uses Google Sheets
- Read Branch Stock from Sheets (Google Sheets): uses Google Sheets
- Read Supplier Policies from Sheets (Google Sheets): uses Google Sheets
- Calculate Expiry Decisions (Code): runs custom JavaScript code
- Aggregate: combines items into one
- Prepare Pharmacist Briefing (Basic LLM Chain): sends a prompt to an LLM, with model: Run Gemini Chat Model
- Send Approval Request via Slack (Slack): send and wait for a reply
- Set Decision Fields (Edit Fields (Set)): sets 4 fields: status, decided_by, decided_at…
…plus 10 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other Google Sheets + Slack templates (1,314) · Other Gmail + Slack templates (957)
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (12)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - Aggregate
n8n-nodes-base.aggregate - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Slack
n8n-nodes-base.slack - Split Out
n8n-nodes-base.splitOut - If
n8n-nodes-base.if - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
From the author
Quick overview Linkedin: https://www.linkedin.com/feed/update/urn:li:activity:7513219338414219265/ This workflow runs every day at 6AM to analyze pharmacy inventory in Google Sheets, predict expiry risk using recent sales velocity, and request a pharmacist’s…