Skip to main content

Saizul Amin

Automated SaaS Customer Health Scoring and Churn Warning System with n8n and Postgres (2026 Playbook)

📅 6 Aug 2026 ⏱ 2 min read
Automation
In this article

    Catching Silent Churn Before Cancellation

    B2B SaaS customers rarely cancel spontaneously. Weeks before the billing card is deleted or the cancellation button is pressed, usage signals decline: daily active logins decrease, key export features go unused, and team collaboration stagnates. This is “silent churn.” By implementing an automated Customer Health Scoring pipeline using n8n and PostgreSQL, Customer Success (CS) teams receive proactive Slack warnings 30 days before customer renewal risks occur.

    Architected by Saizul Amin for SaaS metrics engineering and retention operations.

    Customer Health Scoring Formula Matrix

    Health Factor Weight Measurement Criteria
    License Utilization 35% Active seats / Total purchased seats (past 14 days)
    Core Feature Adoption 30% Weekly execution of high-value workflow actions
    Executive Engagement 20% Admin/Decision-maker login frequency
    Support Friction 15% Negative tickets or unresolved bugs open > 5 days

    PostgreSQL Analytical Query for Weekly Health Calculation

    
    -- Calculate rolling 14-day customer activity score
    WITH activity_metrics AS (
      SELECT 
        tenant_id,
        COUNT(DISTINCT user_id) AS active_users,
        COUNT(CASE WHEN event_name = '\''export_generated'\'' THEN 1 END) AS core_actions,
        MAX(created_at) AS last_active_at
      FROM app_events
      WHERE created_at >= NOW() - INTERVAL '\''14 days'\''
      GROUP BY tenant_id
    )
    SELECT 
      t.id AS tenant_id,
      t.company_name,
      t.mrr_usd,
      t.seats_purchased,
      COALESCE(a.active_users, 0) AS active_users,
      ROUND((COALESCE(a.active_users, 0)::numeric / t.seats_purchased::numeric) * 100, 1) AS seat_utilization_pct,
      CASE 
        WHEN a.active_users IS NULL OR a.active_users = 0 THEN '\''CRITICAL_RISK'\''
        WHEN (a.active_users::numeric / t.seats_purchased::numeric) < 0.40 THEN '\''AT_RISK'\''
        ELSE '\''HEALTHY'\''
      END AS health_tier
    FROM tenants t
    LEFT JOIN activity_metrics a ON t.id = a.tenant_id
    WHERE t.subscription_status = '\''active'\'';
    

    n8n Automated Churn Intervention Workflow

    • Schedule Trigger: Executes every Monday at 08:00 UTC.
    • Postgres Query Node: Executes health scoring SQL script.
    • Filter Node: Isolates accounts flagged as CRITICAL_RISK or AT_RISK where MRR > $500.
    • Slack Alert & Task Creation: Alerts account manager channel with a direct link to the customer account and creates a high-priority retention task in HubSpot CRM.
    Share this article
    Md Saizul Amin
    Written by

    Digital Systems Strategist · AI Agent Developer · 9+ years in digital & IT

    Md Saizul Amin is a digital systems strategist and AI automation engineer from Dhaka, Bangladesh. With 9+ years across IT, web development and digital marketing, he writes practical guides on technology, business, education and online growth — and builds the same kinds of systems (AI agents, websites, SEO and ad campaigns) for clients in Bangladesh, the UK and the USA.

    9+Years in digital & IT
    50+Websites developed
    7Live AI agent systems
    $150K+Ad spend managed

    Specialist in

    AI agents & n8n automationLLM integration (Gemini, GPT-4o, Claude)Custom software & web appsWordPress developmentSEO · AEO · GEOMeta & Google AdsEmail deliverabilityCRM & funnelsIT infrastructure & cybersecurity

    Credentials & experience

    • 🎓
      B.Sc. in Computer Science & EngineeringBangladesh University of Business & Technology (BUBT), 2017–2021
    • 🤖
      AI Automation Engineer · Web Developer · SEO SpecialistUnique Mark Limited, Birmingham UK — 2024 to present
    • 🌱
      IT SpecialistGreen Fund Initiative Inc., USA — 2024 to present
    • 🏥
      Junior IT Consultant — Ministry of Health (DGHS)Built the first national Shareable Health Record website; supported 6,000+ facilities
    • 🧭
      Head of ITWEDO Bangladesh — led IT for 50+ staff, 2021–2023

    ✔ Researched and written by the author, informed by hands-on work on real projects. Articles are updated when facts, tools or guidelines change.

    Want results like this for your business?

    AI agents, custom software, websites and growth systems — let’s talk about yours.