Segment donors and generate personalized messages with Google Sheets and Ollama
Ready for 3.0What this workflow does
This AI workflow has 17 nodes and runs manually, when you click “Execute workflow” (plus 1 other trigger). Along the way it connects Google Sheets and Ollama Chat Model.
How it runs
Trigger: Manually, when you click “Execute workflow” (plus 1 other trigger).
- Get row(s) in sheet (Google Sheets): uses Google Sheets
- Validate & Clean (Code): runs custom JavaScript code
- If: checks a condition and branches into true / false
- RFM Segmentation (Code): runs custom JavaScript code
- Store Invalid Rows (Google Sheets): append or update
- Behavioral Segmentation (Code): runs custom JavaScript code
- Segment to Treatment Mapping (Code): runs custom JavaScript code
- Build Prompt (Code): runs custom JavaScript code
- Basic LLM Chain: sends a prompt to an LLM, with model: Llama3.
- Merge: merges the data from its input branches
…plus 4 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 (8)
- Merge
n8n-nodes-base.merge - Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm - Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - Manual Trigger
n8n-nodes-base.manualTrigger - Ollama Chat Model
@n8n/n8n-nodes-langchain.lmChatOllama
From the author
Quick overview This workflow pulls donor rows from Google Sheets, validates and segments donors using JavaScript-based RFM and behavioral rules, generates tailored email copy with a local Ollama (Llama 3.1) model, and writes the personalized message back to…