# Automate customer retention with Stripe: n8n workflow template

> Started by a clock, and works across Gmail, Google Sheets and Postgres. It hands the judgement calls to OpenAI.

Source: https://millionrounds.com/workflow/automate-customer-retention-with-stripe (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Data collection](https://millionrounds.com/workflows?category=Data+collection#library)

# Automate customer retention with Stripe

Started by a clock, and works across Gmail, Google Sheets and Postgres. It hands the judgement calls to OpenAI. 22 steps, 1 branch: large, and worth reading before you trust it with anything live.

Large Calls a model: OpenAI

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fautomate-customer-retention-with-stripe)

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

**1** Branch: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 1 Model 2 Logic 7 Service 12

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

- 1 **Schedule Trigger - 毎日03:00実行** Schedule trigger *Starts it*
- 2 **対象顧客リスト取得 (CRM)** Http Request *Service*
- 3 **サポートチケット情報取得** Http Request *Service*
- 4 **サポート指標集計** Code *Logic*
- 5 **製品利用ログ取得** Postgres *Service*
- 6 **データ統合 (CRM+サポート)** Merge *Logic*
- 7 **データ統合 (全データ)** Merge *Logic*
- 8 **AI解約リスク予測** Open Ai *Model*
- 9 **高リスク顧客フィルタ** If *Logic*
- 10 **特別オファー生成** Http Request *Service*
- 11 **未更新ログ取得** Google Sheets *Service*
- 12 **オファー内容決定** Code *Logic*
- 13 **メール開封状況取得** Http Request *Service*
- 14 **リテンションメール生成** Open Ai *Model*
- 15 **開封データ処理** Code *Logic*
- 16 **リテンションメール送信** Gmail *Service*
- 17 **効果測定データ更新** Google Sheets *Service*
- 18 **施策ログ保存** Google Sheets *Service*
- 19 **30日経過レコード取得** Google Sheets *Service*
- 20 **顧客ステータス確認** Http Request *Service*
- 21 **継続状況判定** Code *Logic*
- 22 **最終結果更新** Google Sheets *Service*

## How it's built

- **Starts on:** A clock
- **Steps:** 22, with 1 branch
- **Size:** Large: read it before trusting it with anything live
- **Connects to:** Gmail, Google Sheets, Postgres
- **Model:** OpenAI

## Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and Postgres accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

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%2Fautomate-customer-retention-with-stripe)
- **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)[Google Sheets](https://millionrounds.com/workflows?service=Google+Sheets#library)[Postgres](https://millionrounds.com/workflows?service=Postgres#library)

## Workflows like it

Also data collection, with the same services where possible, closest in size first.

- [**Auto-index your website and build a RAG chatbot with Firecrawl** 22 steps · calls a model · Gmail, Qdrant](https://millionrounds.com/workflow/auto-index-your-website-and-build-a-rag-chatbot-with-firecra)
- [**Automatic service with Gemini and Postgres** 22 steps · calls a model · Postgres, Redis](https://millionrounds.com/workflow/automatic-service-with-gemini-and-postgres)
- [**Classify client intake forms with Gemini and Gmail** 22 steps · calls a model · Gmail, Google Sheets](https://millionrounds.com/workflow/classify-client-intake-forms-with-gemini-and-gmail)
- [**Detect keyword cannibalization with OpenAI** 22 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/detect-keyword-cannibalization-with-openai)
- [**Flexible currency rate uploads for SAP B1 with OpenAI** 22 steps · calls a model · Google Sheets](https://millionrounds.com/workflow/flexible-currency-rate-uploads-for-sap-b1-with-openai)
- [**Gate film and TV music cue rights clearance with Gmail** 22 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/gate-film-and-tv-music-cue-rights-clearance-with-gmail)
