Send weekly Shopify RFM win-back offers with GPT-4o-mini, Klaviyo and WhatsApp
Ready for 3.0What this workflow does
This AI workflow has 22 nodes and runs on a schedule (cron 0 10 * * 1). Along the way it connects Google Sheets, OpenAI and Slack. It also calls a.klaviyo.com over HTTP.
How it runs
Trigger: On a schedule (cron 0 10 * * 1).
- Set RFM Config (Code): runs custom JavaScript code
- Fetch Shopify Orders (24 Months) (HTTP Request): calls an HTTP API
- Read Previous Segments (Google Sheets): uses Google Sheets
- Score RFM & Segment (Code): runs custom JavaScript code
- Split Target Segments (Code): runs custom JavaScript code
- AI Write Segment Offer (OpenAI): uses OpenAI
- Apply Offer Guardrails (Code): runs custom JavaScript code
- Create Shopify Discount Code (HTTP Request): calls an HTTP API (POST)
- Collect Offers (Code): runs custom JavaScript code
- Build Klaviyo Import Jobs (Code): runs custom JavaScript code
…plus 11 more steps. See the full node list below.
Services it uses
Other OpenAI + Google Sheets templates (2,011) · Other Google Sheets + Slack templates (1,314) · Other OpenAI + Slack templates (979)
HTTP calls to: a.klaviyo.com
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.
- Code node: the task timeout drops from 300s to 60s. Test with a realistic data volume.
Nodes used (7)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - HTTP Request
n8n-nodes-base.httpRequest - Google Sheets
n8n-nodes-base.googleSheets - OpenAI
@n8n/n8n-nodes-langchain.openAi - Slack
n8n-nodes-base.slack - If
n8n-nodes-base.if
From the author
Quick overview This workflow runs every Monday to pull the last 24 months of Shopify orders, calculate RFM segments per customer, generate segment-specific win-back copy with OpenAI, create unique Shopify discount codes, sync reachable customers into Klaviyo…