Score Shopify customer churn risk and sync results to Klaviyo, Slack, and Gmail
Quick overview This workflow runs weekly to fetch customers from the Shopify Admin GraphQL API, calculate churn risk based on each customer’s median reorder interval, and then sync at-risk customers to Klaviyo while sending a CSV report and summary to Slack and/or Gmail. How it works 1. Runs weekly on a schedule and loads your Shopify domain, thresholds, and toggles for Klaviyo, Slack, and Gmail alerts. 2. Queries the Shopify Admin GraphQL API in pages of 100 customers filtered by minimum order
At a glance
Score Shopify customer churn risk and sync results to Klaviyo, Slack, and Gmail is a ready-made n8n workflow you import as a workflow JSON file — no build required. It connects Shopify, Gmail, Slack, Klaviyo. It's free to download. Follow the 5-step import below to go live in minutes.
- Platform
- n8n
- Connects
- Shopify, Gmail, Slack, Klaviyo
- Modules
- 22
- Price
- Free
- Version
- v1.0

About this workflow
Quick overview This workflow runs weekly to fetch customers from the Shopify Admin GraphQL API, calculate churn risk based on each customer’s median reorder interval, and then sync at-risk customers to Klaviyo while sending a CSV report and summary to Slack and/or Gmail. How it works 1. Runs weekly on a schedule and loads your Shopify domain, thresholds, and toggles for Klaviyo, Slack, and Gmail alerts. 2. Queries the Shopify Admin GraphQL API in pages of 100 customers filtered by minimum order count and an order-date window that excludes very recent purchasers. 3. Calculates each customer’s median days between recent orders, computes days since last order, and labels customers as MEDIUM or HIGH risk based on the days-since-last vs. median interval ratio. 4. Stores at-risk customers across pagination and continues fetching until Shopify reports there are no more pages. 5. Retrieves the full at-risk customer list, clears stored data for the next run, and stops if no at-risk customers are found. 6. If enabled, updates each at-risk customer profile in Klaviyo by writing churnrisk and dayssincelastorder via the Klaviyo API. 7. Generates a dated CSV of at-risk customers, aggregates counts and revenue-at-risk totals, and sends the summary with the CSV attached to Slack and/or Gmail. Setup 1. Add Shopify Admin API credentials (Header Auth) and set your shopifyDomain value in the workflow configuration. 2. Add a Klaviyo Private API key (HTTP Header Auth) if you want to sync profile properties to Klaviyo. 3. Connect your Gmail OAuth2 credential and set the recipient email address if you want email alerts. 4. Connect your Slack credential and set the target Slack channel ID if you want Slack alerts and error notifications. 5. In the workflow configuration, enable or disable emailAlert, slackAlert, and klaviyoEvent, and adjust minimumOrderRequired, customerActiveDays, and safeDays to match your store’s buying cycles. Requirements - Shopify store with Admin API access (GraphQL endpoint). - Klaviyo account for profile updates. - Slack workspace and Gmail account for reporting.
How to import this n8n workflow
- 1
Download the workflow JSON file after purchase.
- 2
Open n8n → click the menu → Import from File.
- 3
Select the downloaded JSON and import.
- 4
Set up credentials for each node that requires them.
- 5
Click Execute Workflow to test, then activate.
Setup guide
Setup guide included
Purchase to unlock the full step-by-step guide
Related N8n workflows
Add a new customer in Shopify as a new contact in Elastic Email
Real-time PulsePoint emergency alerts to iMessage with AI summaries
Monitor legal policy changes with Google Sheets, Gmail and GPT-4o
Add new Shopify customers to AmeriCommerce
AI-powered lead research & personalized email generation with Groq & Google Sheets
Send a Slack reminder for pending Revolut draft payments
Create universal OpenAI-compatible API endpoints for multiple AI workflows
Track HDFC credit card transactions with Google Sheets and Telegram notifications
Reviews
No reviews yet
Be the first to buy and share your experience.
Leave a review
Sign in to share your experience with this workflow.
Create a free account to purchase workflows.
- JSON blueprint — instant download
- Setup guide PDF included
- 5 downloads · valid 30 days
- Works with n8n
Need help setting this up?
Book a 3-hour live setup session with an Agility consultant.
- Configure live on Google Meet / Zoom
- Free follow-up if workflow has defects
- Platform expert assigned to you