Send low-stock inventory reorder emails from Snowflake with Claude and Outlook

Go to Workflow
0 views
Built by Mychel Garzon Mychel Garzon
Created on July 28, 2026

Description

Quick overview
This workflow runs daily, queries Snowflake for items at or below their reorder level, and groups them by supplier. For each supplier, it uses Anthropic Claude to draft a reorder email, optionally appends details to a Google Docs log, and sends the email via Microsoft Outlook.

How it works
A Schedule Trigger fires every day at 07:00 (Europe/Helsinki timezone) and passes through a Workflow Config node that holds your optional Google Docs log ID.
A Snowflake query fetches all inventory rows where current_stock Error Workflow, point to a dedicated error-handler sub-workflow that wires into the Send Error Alert node (it is intentionally unwired in this workflow).

Requirements
Snowflake account with an inventory table containing current_stock, reorder_level, supplier_name, and supplier_email columns
Anthropic API credentials (claude-sonnet-4-6)
Microsoft 365 account with Outlook access
Google Docs OAuth2 credentials (only if audit logging is enabled)

Customization
Adjust the Snowflake query to match your schema, add filters by warehouse or category, or join additional tables for richer item metadata.
Modify the Claude system prompt in Build Email Draft to change tone, language, or email structure — for example to generate Finnish-language emails or include purchase order references.
Change the cron expression in When 7am Daily to run at a different time or frequency.
Extend the log entry format in Log to Google Docs to include item names, SKUs, or a hyperlink back to the workflow execution.
Replace the Google Docs logging step with a Slack notification, a row insert into PostgreSQL, or any other audit destination by swapping the node after Check Configured Doc ID.

Nodes Used (6)

Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic
Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Code
n8n-nodes-base.code
Google Docs
n8n-nodes-base.googleDocs
Microsoft Outlook
n8n-nodes-base.microsoftOutlook
Snowflake
n8n-nodes-base.snowflake