# Score Shopify customer churn risk and sync results: n8n workflow

> Started by a clock, and works across Gmail and Slack. 22 steps, 7 branches: large, and worth reading before you trust it with anything live.

Source: https://millionrounds.com/workflow/score-shopify-customer-churn-risk-and-sync-results (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [E-commerce](https://millionrounds.com/workflows?category=E-commerce#library)

# Score Shopify customer churn risk and sync results

Started by a clock, and works across Gmail and Slack. 22 steps, 7 branches: large, and worth reading before you trust it with anything live.

Large

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscore-shopify-customer-churn-risk-and-sync-results)

**22 steps** Large: read it before trusting it with anything live

**7** Branches: places the flow splits

**0** Loops or waits

**2** Services it connects to

## The flow

Starts it 2 Logic 14 Service 6

The steps in the order they run, from what starts it.

- 1 **Weekly Schedule Trigger** Schedule trigger *Starts it*
- 2 **On Global Error** Error trigger *Starts it*
- 3 **Set Workflow Config** Set *Logic*
- 4 **Post Error to Slack** Slack *Service*
- 5 **If Alerts Enabled** If *Logic*
- 6 **Fetch Customer Data** Graphql *Service*
- 7 **Calculate Churn Risk** Code *Logic*
- 8 **If Batch Has Risky Customers** If *Logic*
- 9 **Save Batch to Memory** Code *Logic*
- 10 **Check for Next Page** If *Logic*
- 11 **Limit to 1 Item** Limit *Logic*
- 12 **Retrieve Customer Data** Code *Logic*
- 13 **If Risky Customers Found** If *Logic*
- 14 **If Klaviyo Enabled** If *Logic*
- 15 **Aggregate Churn Results** Code *Logic*
- 16 **Create CSV Export** Convert To File *Service*
- 17 **Send to Klaviyo API** Http Request *Service*
- 18 **Combine Export Data** Merge *Logic*
- 19 **If Email Notifications On** If *Logic*
- 20 **If Slack Notifications On** If *Logic*
- 21 **Send Email Alert** Gmail *Service*
- 22 **Send CSV to Slack Channel** Slack *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 22, with 7 branches
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Slack
- **Model:** None. This is plumbing, not judgement

## Questions

What does it need to run?

An n8n account, plus your own Gmail and Slack accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

How long does it take to set up?

Take your time. At 22 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

**Before you run it**

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 22 steps before you point it at anything that matters.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fscore-shopify-customer-churn-risk-and-sync-results)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Gmail](https://millionrounds.com/workflows?service=Gmail#library)[Slack](https://millionrounds.com/workflows?service=Slack#library)

## Workflows like it

Also e-commerce, with the same services where possible, closest in size first.

- [**Manage inventory reorders with Google Sheets and Slack** 22 steps · Gmail, Google Sheets](https://millionrounds.com/workflow/manage-inventory-reorders-with-google-sheets-and-slack)
- [**AI-powered WhatsApp customer support for Shopify brands** 22 steps · calls a model · Slack, WhatsApp](https://millionrounds.com/workflow/ai-powered-whatsapp-customer-support-for-shopify-brands)
- [**Orchestrate multi-store order allocation with OpenAI** 22 steps · calls a model · Postgres, Slack](https://millionrounds.com/workflow/orchestrate-multi-store-order-allocation-with-openai)
- [**E-commerce bestseller video generator with Algolia** 21 steps · Gmail](https://millionrounds.com/workflow/e-commerce-bestseller-video-generator-with-algolia)
- [**AI agent for transportation orders management with OpenAI** 21 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/ai-agent-for-transportation-orders-management-with-openai)
- [**AI-powered customer email support for e-commerce with Pinecone** 21 steps · calls a model · Gmail](https://millionrounds.com/workflow/ai-powered-customer-email-support-for-e-commerce-with-pineco)
