Finance · n8n

Build a Monthly Customer Cohort Retention Report Automatically

Retention is the number that decides whether your store compounds or leaks. This workflow groups customers by the month of their first order and calculates how many came back in each following month — a real cohort table, in Google Sheets, with no analyst required.

difficulty Advancedsetup 45 minresult A living cohort-retention table every month — see exactly whether new customers are sticking
  1. 1

    Run on the 1st

    A Schedule Trigger fires monthly; a Shopify node pulls all orders with customer id and date.

  2. 2

    Assign cohorts

    A Code node stamps each customer with their first-order month, then marks which later months they ordered again.

  3. 3

    Build the matrix

    The same node rolls this up into a cohort-by-month retention percentage matrix.

  4. 4

    Write to Sheets

    A Google Sheets node writes the matrix so it updates in place each month.

  5. 5

    Email the headline

    A Gmail node sends you the month-1 and month-3 retention numbers so the trend is unmissable.

Frequently asked questions

Is this heavy on a big store?

For very large stores, page the orders and pre-aggregate, or point it at a data export. For most stores pulling a year of orders monthly is perfectly fine.

Why cohorts instead of a single retention number?

A blended number hides whether things are improving. Cohorts show if the customers you acquired this quarter retain better than last quarter's — the signal that actually guides spend.

About this recipe. Recipes on FlowRecipesHub are written for business owners, not developers, and are tested before publishing — how recipes get made. Some ingredient links are affiliate links that cost you nothing — full disclosure.