Segment retail customers by purchase behavior with CRM and Google Sheets
Ready for 3.0Ready 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 workflow has 11 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Sheets.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Normalize Customer Purchase Data (Edit Fields (Set)): sets or maps fields
- Validate Customer Event (If): checks a condition and branches into true / false
- Determine Customer Segment (Switch): routes items into 4 branches
- Assign VIP Customer Segment (Edit Fields (Set)): sets 1 field: segment_tag
- Assign New Customer Segment (Edit Fields (Set)): sets 1 field: segment_tag
- Assign Repeat Customer Segment (Edit Fields (Set)): sets 1 field: segment_tag
- Assign Inactive Customer Segment (Edit Fields (Set)): sets 1 field: segment_tag
- Normalize Customer Segment Output (Edit Fields (Set)): sets 5 fields: customer_id, email, segment_tag…
- Sync Customer Segment to CRM (HTTP Request): calls an HTTP API (POST)
- Append or update row in sheet (Google Sheets): append or update
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 (6)
- Edit Fields (Set)
n8n-nodes-base.set - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - Switch
n8n-nodes-base.switch - Webhook
n8n-nodes-base.webhook
From the author
(Retail Automation) Auto-Segment Customers by Purchase Behavior This workflow automatically segments customers based on their purchase behavior whenever a new order or customer update event is received from platforms like WooCommerce, Shopify, or a CRM. It…