Monitor pharmacy inventory automatically. Use this specialized n8n workflow to check Google Sheets daily for low stock and expiring medicine, sending immediate email alerts to ensure safety and compliance.
Download this n8n workflow template and start using it instantly.
Pharmacists and Pharmacy Managers who need reliable daily inventory status.
Operations teams looking for proven n8n templates to automate compliance checks.
Businesses using Google Sheets as a primary inventory control system.
Anyone needing an automated n8n solution for monitoring time-sensitive data.
Managing pharmaceutical inventory requires precision, especially regarding stock levels and expiry dates. Relying on manual checks is error-prone and inefficient. This powerful n8n workflow provides a robust automation solution. By connecting directly to your Google Sheets inventory database, this n8n template runs a detailed analysis daily. The core automation logic swiftly identifies items that are below a customizable stock threshold (default 10 units) or due to expire within 30 days (or are already expired). The result is a consolidated, actionable email alert sent automatically. This specific n8n workflow ensures timely replenishment, minimizes waste, and crucially, maintains patient safety by preventing the dispensing of outdated medications. It serves as a perfect example of a scheduled n8n node automation.
The entire process is initiated by an internal n8n trigger, scheduled to run every morning.
Daily Stock Check n8n trigger, configured to run automatically at 9 AM daily.Fetch Stock Data n8n node connects to the designated Google Sheet, pulling the entire inventory record set (columns A:E).Wait For All Data n8n node ensures that the subsequent processing steps only execute once all data items have been successfully loaded.Check Expiry Date and Low Stock custom code n8n node performs the crucial business logic. It iterates through each inventory item, checking if the stockquantity is less than the defined threshold (default 10) and calculates if the expirydate is within a 30-day warning window. It compiles separate markdown lists for low stock and expiry alerts.Update Google Sheet n8n node is intended to log the status of the generated alerts back into the inventory sheet, providing a historical record of notifications.Send Email Alert n8n node to construct a detailed email containing the summarized lowStockList and expiryList. This critical n8n workflow step ensures that the pharmacist receives timely, actionable intelligence.To deploy this powerful n8n workflow, follow these steps:
Fetch Stock Data and Update Google Sheet n8n node parameters, replace {{yourgooglesheet_id}} with the actual ID of your pharmacy inventory spreadsheet.Send Email Alert n8n node to enable outgoing notifications.toEmail parameter in the Send Email Alert n8n node to the actual email address of the pharmacist or manager. Daily Stock Check (Cron n8n trigger):
Function: Serves as the automated n8n trigger, initiating the entire process on a schedule.
Key Configuration: Runs daily at 9:00 AM.
Fetch Stock Data (Google Sheets n8n node):
Function: Connects to the inventory database (Google Sheet) and retrieves the required data range.
Key Configuration: Operation set to 'Get All' rows from PharmacyInventory!A:E.
Check Expiry Date and Low Stock (Code n8n node):
Function: Executes custom JavaScript logic to determine which items require alerts based on stock thresholds (default 10) and expiry dates (30-day warning).
Key Configuration: Creates lowStockList and expiryList variables, which are then used to populate the email content in a subsequent n8n node.
Update Google Sheet (Google Sheets n8n node):
Function: Intended to write metadata back to the sheet, such as alert timestamps or status updates, ensuring the Google Sheet remains synchronized with the n8n workflow's actions.
Key Configuration: Operation set to 'Update'.
Send Email Alert (EmailSend n8n node):
Function: Formats and sends the finalized alert email using the lists generated by the Code n8n node.
* Key Configuration: Subject line includes the date; uses dynamic variables ({{ $json.lowStockList }} and {{ $json.expiryList }}) for the email body.
Automate your daily briefing using this n8n workflow. It combines Google Calendar events, current weather data via WeatherAPI, and AI summarization (Gemini) to send personalized daily agendas via Telegram.

Generate hyper-personalized travel itineraries instantly using this sophisticated n8n workflow. It integrates GPT-4o, Pinecone RAG, and a custom UI trigger via an n8n webhook, proving why n8n is essential for AI projects.

Automate hyper-personalized thank-you emails instantly using this n8n workflow. It scrapes prospect websites, utilizes GPT-4o for custom copy generation, and sends tailored replies via Gmail or any email n8n node.

Use this advanced n8n workflow to orchestrate a complex AI content generation process. Features multiple specialized agents for research, outlining, writing, and editing using n8n nodes.

Automate phishing threat detection using this robust n8n workflow. Integrate Outlook, VirusTotal, and URLScan.io to analyze suspicious URLs, classify threats, and report consolidated security results via Slack.

This robust n8n workflow automates the creation of photorealistic social media images using RunComfy's ComfyUI Flux Realism models. It manages prompts from Airtable, handles server lifecycle, and updates records automatically. Deploy this n8n template for scalable AI content generation.

The AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.







































