Skip to product information

n8n Shopify RFM Win-Back Workflow: GPT-4o + Klaviyo + WhatsApp

n8n Shopify RFM Win-Back Workflow: GPT-4o + Klaviyo + WhatsApp

 (200+Reviews)
Regular price £36.99
Regular price £36.99 Sale price
SAVE Sold out
⬇
Instant Digital Download
∞
Unlimited Downloads
★
Lifetime Access in Your Account
🔥
128+ Sold
Popular with n8n builders
⚡
23 people viewing
High interest right now
✅
9 added today
Fast-moving digital product
n8n Shopify RFM Win-Back Workflow: GPT-4o + Klaviyo + WhatsApp

n8n Shopify RFM Win-Back Workflow: GPT-4o + Klaviyo + WhatsApp

Regular price £36.99
Regular price £36.99 Sale price
SAVE Sold out

Win back Shopify customers every week—automatically segmented by RFM, written with GPT-4o, and delivered via Klaviyo + WhatsApp

This n8n workflow pulls your last 24 months of Shopify orders every Monday, calculates RFM customer segments, generates segment-specific win-back offers using OpenAI (GPT-4o-mini), creates Shopify discount codes, syncs reachable customers into Klaviyo lists, and sends WhatsApp Business Cloud template messages—then posts a weekly performance report to Slack.

What this workflow does

  • Runs on schedule: Executes every Monday at 10 AM using a cron trigger.
  • Builds RFM segments: Fetches Shopify orders via the Shopify Admin REST API, loads the previous week’s segments from Google Sheets, and calculates recency, frequency, and monetary scores.
  • Assigns win-back logic: Determines an RFM segment per customer, marks a deterministic 10% holdout per segment, and computes basic segment statistics plus week-over-week movement.
  • Generates offer copy and discounts: For each configured segment above a minimum size, uses OpenAI (gpt-4o-mini) to draft email and WhatsApp offer copy, applies discount cap guardrails, and creates a segment-specific Shopify discount code via the Shopify Admin GraphQL API.
  • Syncs to Klaviyo: Bulk-imports non-holdout, email-consented customers into the matching Klaviyo list, storing offer details as profile properties. Alerts on import failures in Slack.
  • Sends WhatsApp: Sends an approved WhatsApp template message, prioritized by segment and capped per day, logs send results to Google Sheets, and includes the holdout flag.
  • Closes the loop: Upserts the current week’s customer segments (including the offer code and holdout flag) back to Google Sheets.

Use cases

  • Weekly Shopify win-back campaigns for “at-risk” and “lost” customers.
  • Automated RFM segmentation and discount-code management without manual spreadsheets.
  • Coordinated outreach across Klaviyo and WhatsApp with segment-specific messaging.

Technical details

  • n8n nodes/tools: if, code, slack, sticky note, http request, google sheets
  • Integrations: Shopify Admin REST + GraphQL APIs, OpenAI (gpt-4o-mini), Klaviyo, WhatsApp Business Cloud, Slack, Google Sheets
  • Workflow output: Google Sheets win-back log + weekly alerts/reporting
View full details