Expansion Revenue Detector

AI monitors Stripe payment patterns, scores expansion potential across 5 signal categories, and routes upsell and at-risk briefs to Pipedrive automatically.

AI monitors Stripe payment and subscription data, scores expansion potential across 5 signal categories, and routes upsell/at-risk briefs to Pipedrive automatically. 24-node swarm. $0.020/event — single LLM call.

4-Agent Pipelineinputinvoice.paid01ResearcherCode only — no LLM02Analyst5 signals — Opus 4.603Routerconfidence?high conf.Activitylow conf.Note$0.020/event — single LLM callITP-measured across 20 events
Expansion Revenue Detector pipeline: 4-agent Stripe payment scoring with confidence-gated Pipedrive routing

Four Agents. Five Signals. Expansion Revenue Detected Automatically.

Step 1The Researcher

Code Only

Enriches invoice.paid webhook data with Stripe subscription, customer, and payment history. Computes MRR delta arithmetically — zero LLM cost.

Step 2The Analyst

Tier 1 Reasoning

Scores expansion potential across 5 signal categories: MRR Growth, Plan Ceiling, Payment Loyalty, Usage Plateau, Downgrade Risk. Single LLM call.

Step 3The Router

IF Logic

Routes based on confidence threshold. High confidence → Pipedrive Activity for immediate action. Low confidence → Note for human review. DOWNGRADE_RISK always creates an at-risk Activity.

Step 4The Syncer

CRM Write

Writes to Pipedrive: creates Person (if new), creates or updates Deal, adds Activity (upsell/at-risk) or Note (retention/monitor). Non-blocking — pipeline never stalls on CRM errors.

What It Does NOT Do

×

Does not connect to your billing system beyond Stripe — no Chargebee, Recurly, or custom billing integration

×

Does not predict future churn — it scores current expansion signals from payment patterns, not predictive modeling

×

Does not modify Stripe subscriptions — it reads payment data and writes intelligence to Pipedrive only

×

Does not replace your CS platform — it detects expansion opportunities and routes briefs for human follow-up

The Complete Customer Success Bundle

9 files — everything you need to deploy the 24-node Expansion Revenue Detector pipeline.

expansion_revenue_detector_v1_0_0.jsonThe 24-node n8n workflow (4-agent pipeline with confidence-gated routing)
analyst_system_prompt.mdSystem prompt for the Analyst agent — 5-signal taxonomy and scoring rubric
signal_taxonomy.mdComplete signal category definitions, confidence thresholds, and routing rules
mrr_calculation_guide.mdMRR delta arithmetic logic — how the Researcher computes expansion signals
tdd-v1.mdTechnical Design Document — architecture, agent topology, data flow
itp-results-v1.mdITP test results — 20/20 scenarios, cost analysis, consistency metrics
bqs-audit-v1.mdBQS v2 audit — 12/12 PASS with evidence
error-handling-matrix.mdError scenarios, fallback behavior, and dead letter handling
README.mdSetup guide — credentials, Stripe webhook config, Pipedrive mapping

Tested. Measured. Documented.

Every metric is ITP-measured. The Expansion Revenue Detector processes Stripe webhook events at $0.020/event with a single LLM call.

Workflow Nodes

24 specialized n8n nodes

Blueprint Quality Standard

BQS v2 — 12/12 PASS

Agent Roles

4 (Researcher, Analyst, Router, Syncer)

Required Credentials

Stripe API + Anthropic API + Pipedrive API

Bundle Contents

9 files

Cost per Event

$0.020 (ITP-measured blended average)

ITP Milestones

ERD-01 through ERD-07 + U-01 through U-06 — 14/14 PASS

Score Consistency

Variance 0 across 3 runs (threshold <= 1.0)

n8n Compatibility

Self-hosted

Expansion Revenue Detector v1.0.0 — Technical Reference
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Pipeline:     Stripe Webhook → Researcher (Code) → Analyst (Opus 4.6) → Router (IF) → Syncer (Pipedrive)
Topology:     4-agent swarm, single LLM call, confidence-gated routing
Signals:      MRR_GROWTH | PLAN_CEILING | PAYMENT_LOYALTY | USAGE_PLATEAU | DOWNGRADE_RISK
Routing:      High confidence → Activity | Low confidence → Note | DOWNGRADE_RISK → always Activity
Node Count:   24 (Webhook 1, HTTP 11, Code 9, IF 2, Dead Letter 1)
LLM:          Claude Opus 4.6, temperature 0.1, max_tokens 1500
Cost:         $0.020/event blended | $0.000 invalid/rejected
ITP:          20/20 (100%) — ERD-01 through ERD-07, U-01 through U-06
BQS:          12/12 PASS
Consistency:  Variance 0 across 3 runs (threshold ≤ 1.0)

Expansion Revenue Detector v1.0.0

$199

one-time purchase

What you get:

  • Production-ready 24-node n8n workflow — import and deploy
  • Stripe webhook integration — fires on every invoice.paid event
  • 5-signal expansion scoring with confidence thresholds
  • Automatic Pipedrive Person, Deal, Activity, and Note creation
  • Asymmetric risk logic — DOWNGRADE_RISK always escalates
  • Code-only Researcher — MRR delta computed without LLM cost
  • Full ITP test results with 20 scenarios and cost analysis
  • BQS v2 certification (12/12 PASS)

Frequently Asked Questions

What Stripe events does this workflow process?+

It triggers on invoice.paid events via Stripe webhook. Every successful payment fires the pipeline — subscription renewals, upgrades, downgrades, and one-time charges are all analyzed.

What are the 5 signal categories?+

MRR Growth (revenue increasing), Plan Ceiling (approaching plan limits), Payment Loyalty (consistent long-term payer), Usage Plateau (flat or declining engagement), and Downgrade Risk (signals of potential churn or downgrade).

How does the confidence-gated routing work?+

The Analyst outputs a confidence score (0-1). High confidence signals get a Pipedrive Activity for immediate action. Low confidence signals get a Note for human review. DOWNGRADE_RISK always creates an at-risk Activity regardless of confidence — asymmetric risk logic.

Why is the Researcher code-only with no LLM call?+

MRR delta, payment history, and subscription metadata are numerical/structured data. The Researcher computes these arithmetically using n8n Code nodes — no reasoning needed, so zero LLM cost on data enrichment.

How much does each event cost to process?+

ITP-measured: $0.020 per event blended average. Only one LLM call (the Analyst) per event. Invalid or rejected webhooks cost $0.000. This is the cheapest product in the ForgeWorkflows lineup.

What gets written to Pipedrive?+

Person (created if new), Deal (created or updated with expansion score), Activity (for high-confidence upsell or any DOWNGRADE_RISK), and Note (for low-confidence signals requiring human review).

What happens if Pipedrive is temporarily unavailable?+

The Syncer uses non-blocking writes. CRM errors are caught and logged to the Dead Letter node. The pipeline never stalls — webhook response is always returned.

Do I need to modify my Stripe setup?+

You need to add a webhook endpoint pointing to your n8n instance and enable the invoice.paid event. The README includes step-by-step Stripe webhook configuration.

Can I customize the signal thresholds?+

Yes. The Analyst system prompt includes the scoring rubric for all 5 signals. You can adjust confidence thresholds and scoring criteria to match your business model.

What n8n version is required?+

Tested on n8n self-hosted. The workflow uses standard HTTP Request, Code, and IF nodes — no community nodes required.

More Pipedrive Blueprints

Powered by Anthropic