Free template · Reporting & Analytics

Stop blasting the same email to everyone.

Reads your customer list, segments by behavior and value. Outputs a list per segment for personalized outreach. The campaign that gets 3-5x the response of an everyone-blast.

Setup time~25 minutes
Run cost~$0.01/mo
ValidationTested + ready to run
LicenseFree, yours forever

Seven segments. Tags pushed back automatically.

  1. 1
    Schedule Trigger — 1st of each month, 9am
    Cron: 0 9 1 * *. Once a month is the right cadence for RFM. Customer behavior does not shift fast enough to justify daily resegmentation.
  2. 2
    Fetch All Customers — HTTP Request
    Pulls every customer with their order history. Replace the URL with your CRM, POS, or e-commerce platform (Shopify, Klaviyo, Mindbody, Mariana Tek, HubSpot) and add your bearer token.
  3. 3
    Sample Customer Data (replace this)
    Five sample customers at different RFM positions let the workflow run out of the box. Delete this once Fetch All Customers is wired up.
  4. 4
    RFM Segment — Code
    JavaScript node assigns each customer to one of seven segments based on recency, frequency, and total spend: VIP, New / Recent, Loyal Active, At Risk, Churned, One-Time Lost, Casual. Returns counts and total spend per segment.
  5. 5
    Label + Recommend Campaigns — OpenAI
    gpt-4o-mini outputs JSON with a plain-English description of each segment and one specific campaign idea (subject line, offer, channel) per segment. JSON output mode is on so the next node reads it cleanly.
  6. 6
    Push Tags Back to CRM — HTTP Request
    POSTs each customer ID with its assigned segment to your CRM or email tool's bulk-tag endpoint (Klaviyo profiles, HubSpot lists, Shopify customer tags). Now your campaigns are pre-segmented.

Vertical-specific framing

E-commerce
Pulls Shopify customers with order history, segments them, pushes tags to Klaviyo. Your "VIP" flow runs automatically. Your "Churned" win-back goes out at the right cadence without manual list-building.
Med spa
Pulls Mindbody clients with treatment history. Identifies "At Risk" clients (no booking in 60 days) so the front desk can call before they fully churn. Keeps "Loyal Active" clients on the membership path.
Gym or fitness studio
Pulls Mariana Tek or Glofox members. Identifies "Casual" members (low frequency) for a re-engagement campaign before they cancel. Spots "VIP" members who deserve a private outreach from the owner.
Subscription or membership
Pulls Stripe or Recurly customers. Flags "At Risk" before they churn (recency drop, support tickets) so customer success can intervene with a save offer.
Get the template
Three quick questions, then we send the JSON. We use the answers to recommend templates that fit your business.

No spam. Unsubscribe anytime. The JSON link arrives instantly after submit.

Three accounts. Free or close to it.

n8nFree self-hosted, or n8n Cloud starting $20/mo
OpenAI API keyPay-as-you-go, ~$0.001 per monthly run
Your CRM or POSAPI access from Shopify, Klaviyo, Mindbody, HubSpot
Email tool with tagsKlaviyo, HubSpot, Mailchimp, ActiveCampaign

What this is worth, conservatively

Revenue per send for segmented vs untargeted email3 to 5x
SourceKlaviyo benchmarks
Brand sending 8 campaigns/mo at $1,500 avg revenue per send$24K to $48K extra/yr
Time saved building segments by hand2 to 3 hrs/month
Cost to run this template forever~$0.12/year

Numbers from Klaviyo's email benchmark reports. Your real lift depends on whether your team actually sends segment-specific creative or sends the same email to every segment.

Related

Want this customized to your stack?

If you'd rather have us connect this to your actual customer database and email tool, tune the segment thresholds to your business, and hand it back working, that's our $9,000 reporting build. 2 to 4 weeks.

Book a 15-min walkthrough