Templates / Segment donors and generate personalized messages with Google Sheets and Ollama

Segment donors and generate personalized messages with Google Sheets and Ollama

Ready for 3.0

by Tien Nguyen · 1 views · created 2026-09-08 · Lead Nurturing, AI Summarization

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What 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).

  1. Get row(s) in sheet (Google Sheets): uses Google Sheets
  2. Validate & Clean (Code): runs custom JavaScript code
  3. If: checks a condition and branches into true / false
  4. RFM Segmentation (Code): runs custom JavaScript code
  5. Store Invalid Rows (Google Sheets): append or update
  6. Behavioral Segmentation (Code): runs custom JavaScript code
  7. Segment to Treatment Mapping (Code): runs custom JavaScript code
  8. Build Prompt (Code): runs custom JavaScript code
  9. Basic LLM Chain: sends a prompt to an LLM, with model: Llama3.
  10. Merge: merges the data from its input branches

…plus 4 more steps. See the full node list below.

Services it uses

Google SheetsOllama Chat Model

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)

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…

Excerpt from Tien Nguyen's description on n8n.io.

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.