Send low-stock inventory reorder emails from Snowflake with Claude and Outlook
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs on a schedule (cron 0 7 * * *). Along the way it connects Snowflake, Anthropic Chat Model, Google Docs and Microsoft Outlook.
How it runs
Trigger: On a schedule (cron 0 7 * * *).
- Workflow Config (Edit Fields (Set)): sets 1 field: log_doc_id
- Query Snowflake DB (Snowflake): run a query
- If: checks a condition and branches into true / false
- Group Items by Supplier (Code): runs custom JavaScript code
- Loop Over Suppliers (Loop Over Items (Split in Batches)): loops over the items in batches
- Set Supplier Details (Edit Fields (Set)): sets 7 fields: supplier_name, supplier_email, items…
- Build Email Draft (Basic LLM Chain): sends a prompt to an LLM, with model: Claude Email Generation
- Convert Markdown to HTML (Markdown): converts between Markdown and HTML
- Check Configured Doc ID (If): checks a condition and branches into true / false
- Log to Google Docs (Google Docs): update
…plus 2 more steps. See the full node list below.
Services it uses
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.
Nodes used (12)
- Edit Fields (Set)
n8n-nodes-base.set - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Snowflake
n8n-nodes-base.snowflake - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - Code
n8n-nodes-base.code - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Anthropic Chat Model
@n8n/n8n-nodes-langchain.lmChatAnthropic - Markdown
n8n-nodes-base.markdown - Google Docs
n8n-nodes-base.googleDocs - Microsoft Outlook
n8n-nodes-base.microsoftOutlook
From the author
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…