Win/Loss Intelligence Agent

AI-powered win/loss analysis that reconstructs deal timelines, identifies the key factors behind every closed deal, and generates actionable intelligence briefs for your sales team.

AI-powered win/loss analysis that reconstructs deal timelines, identifies the key factors behind every closed deal, and generates actionable intelligence briefs for your sales team. 25-node n8n workflow with 4 agents (Fetcher, Researcher, Analyst, Formatter). HubSpot deal closure webhook or manual webhook trigger. Fetcher pulls deal data, contacts, and activities from HubSpot API. Researcher (the analysis model + web_search) gathers company and competitor context when INCLUDE_COMPETITOR_RESEARCH=true. Analyst (the primary reasoning model) performs deep 6-factor causal win/loss analysis with timeline reconstruction, evidence-based factor classification (MAJOR/CONTRIBUTING/NOT A FACTOR), lessons learned, and actionable recommendations. Formatter (the analysis model) generates Notion intelligence brief and HubSpot deal note. 6 win/loss factors: product_fit, sales_execution, competitive_dynamics, pricing_value, champion_engagement, timing_market. DUAL-MODEL PER_RECORD: the primary reasoning model for deep causal analysis, the analysis model for research and formatting, $0.30-$0.60/deal. This came from a product team that requested win/loss data and received an anecdotal summary from the sales VP instead of structured analysis. The agent compiles win/loss patterns into data the product team can actually use.

Last updated March 16, 2026

The average B2B deal cycle has extended to 75+ days, with 40-60% of qualified pipeline stalling before close. Sales managers cannot inspect every deal daily. Automated deal intelligence surfaces risk signals — competitor mentions, sentiment shifts, stakeholder disengagement — before they become lost deals.

triggerDeal Closure01FetcherHubSpot API02Researcherweb_search03Analyst6-Factor04FormatterBrief + NoteNotionIntel BriefHubSpotDeal Note

Four Agents. Six Factors. Per-Deal Causal Intelligence.

Fetcher

Step 1Fetcher

HubSpot Webhook + Code

HubSpot deal closure webhook fires when a deal moves to Closed Won or Closed Lost (configurable via DEAL_STAGES_CLOSED_WON and DEAL_STAGES_CLOSED_LOST), or manual Webhook for on-demand analysis. Config Loader reads INCLUDE_COMPETITOR_RESEARCH, NOTION_DATABASE_ID, and deal stage configurations. Fetcher pulls deal record, associated contacts, and activity timeline from HubSpot API.

Researcher

Step 2Researcher

Tier 2 Classification + web_search

What does Researcher actually decide? the analysis model with web_search gathers company and competitor context when INCLUDE_COMPETITOR_RESEARCH=true and competitor field is populated. Researches company background, market position, competitive landscape, and recent news. When INCLUDE_COMPETITOR_RESEARCH=false, passes through deal data without external research. Conditional execution minimizes cost on deals without competitor data.

Analyst

Step 3Analyst

Tier 1 Reasoning

This step exists because raw data alone is not enough. the primary reasoning model performs deep 6-factor causal win/loss analysis: product_fit, sales_execution, competitive_dynamics, pricing_value, champion_engagement, timing_market. Reconstructs deal timeline from activity data. Classifies each factor as MAJOR, CONTRIBUTING, or NOT A FACTOR with evidence citations. Generates lessons learned and actionable recommendations for the sales team.

Formatter

Step 4Formatter

Tier 2 Classification

Without this step, upstream analysis sits idle. the analysis model generates two outputs: Notion intelligence brief page (executive summary, deal timeline, per-factor analysis with classification badges, lessons learned, recommendations) and HubSpot deal note (compact win/loss summary with key factors and Notion link). Both outputs are created via their respective APIs.The scorer ignored an optional hint field. Adding 4 lines of explicit scoring rules — what the field represents, how it affects threshold — fixed scores immediately.

That's the full pipeline. Here's what it intentionally does NOT do — and why those boundaries exist.

What It Does NOT Do

×

Does not re-activate lost deals — that is what Lost Deal Re-Activation Agent does

×

Does not generate competitive battle cards — that is what Deal Competitor Tracker does

×

Does not aggregate metrics across quarters — that is what Quarterly Business Review Generator does

×

Does not modify HubSpot deal data or pipeline stages — read-only analysis with Notion and HubSpot note output

×

Does not scrape websites unconditionally — web_search only when INCLUDE_COMPETITOR_RESEARCH=true and competitor field populated

×

Does not analyze active deals — fires only on deal closure events (Closed Won or Closed Lost)

With those boundaries clear, here's everything that ships when you purchase.

The Complete Customer Success Bundle

7 files.

CHANGELOG.mdVersion history
README.mdSetup and configuration guide
docs/TDD.mdTechnical Design Document
system_prompts/analyst_system_prompt.mdAnalyst system prompt
system_prompts/formatter_system_prompt.mdFormatter system prompt
system_prompts/researcher_system_prompt.mdResearcher system prompt
win_loss_intelligence_agent_v1.0.0.jsonn8n workflow (main pipeline)

The technical specifications below are ITP-measured, not estimated.

Tested. Measured. Documented.

Every metric is Independent Test Protocol (ITP)-measured. The Win/Loss Intelligence Agent reconstructs deal timelines and performs 6-factor causal analysis on every closed deal — the primary reasoning model for deep reasoning, the analysis model for research and formatting at $0.30-$0.60/deal.

Workflow Nodes

25

Blueprint Quality Standard

12/12 PASS

Agent Architecture

4 agents: Fetcher (code-only), Researcher (Sonnet 4.6 + web_search), Analyst (Opus 4.6), Formatter (Sonnet 4.6)

Required Credentials

Anthropic API, HubSpot (OAuth2), Notion (httpHeaderAuth)

Bundle Contents

7 files

Cost per Deal

$0.30-$0.60/deal (ITP-measured)

ITP Milestones

20/20 records, 14/14 milestones PASS

n8n Compatibility

2.7.5

Tested on n8n v2.7.5, March 2026

Win/Loss Intelligence Agent v1.0.0 — Technical Reference━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Architecture: 25 n8n nodes, 4 agents (Fetcher → Researcher → Analyst → Formatter)Trigger:      HubSpot deal closure webhook + Manual WebhookInput:        HubSpot API — deal record + contacts + activity timelineIntelligence: Opus 4.6 (6-factor causal analysis), Sonnet 4.6 (research + formatting)Output:       Notion (intelligence brief page) + HubSpot (deal note)Cost:         $0.30-$0.60/deal (ITP-measured)ITP:          20/20 records, 14/14 milestones PASSBQS:          12/12 PASSTool A:       HubSpot (input — deals + contacts + activities via OAuth2 API)Tool B:       Notion (output — intelligence brief page via httpHeaderAuth API)Intelligence: 6-factor win/loss taxonomy + DUAL-MODEL PER_RECORD patternCost Value:   0.45

What You'll Need

⚠ Data Source Dependency

Conditionally uses Anthropic web_search tool when INCLUDE_COMPETITOR_RESEARCH=true and competitor field is populated. Researches company background and competitive landscape to enrich deal analysis. When disabled, analyzes HubSpot data only.

Platform

n8n 2.7.5+

Est. Monthly API Cost

$6-$12/month (20 deals/month) + HubSpot/Notion included tiers

Credentials Required

  • Anthropic API
  • HubSpot (OAuth2)
  • Notion (httpHeaderAuth, Bearer prefix)

Services

  • HubSpot account (OAuth2 with deals, contacts, and engagements scopes)
  • Notion workspace (integration token with Bearer prefix)
  • Anthropic API key (~$0.30-$0.60/deal)

Setup Track

Quick Start

~15 min

All credentials live, n8n running

Full Setup

1–2 hrs

Needs API config + tables

From Scratch

2–4 hrs

No n8n, no credentials

Win/Loss Intelligence Agent v1.0.0

$199

one-time purchase

What you get:

  • ITP-tested 25-node n8n workflow — import and deploy
  • HubSpot deal closure webhook fires automatically when deals close (won or lost)
  • Manual Webhook for on-demand win/loss analysis with deal ID
  • HubSpot Fetcher pulls deal record, contacts, and full activity timeline via API
  • Conditional Researcher (the analysis model + web_search) for company and competitor context when INCLUDE_COMPETITOR_RESEARCH=true
  • 6-factor causal analysis via the primary reasoning model: product_fit, sales_execution, competitive_dynamics, pricing_value, champion_engagement, timing_market
  • Evidence-based factor classification: MAJOR, CONTRIBUTING, or NOT A FACTOR with citations from deal data
  • Deal timeline reconstruction from HubSpot activity history
  • Lessons learned and actionable recommendations per deal
  • Notion intelligence brief page with executive summary, timeline, per-factor analysis, and recommendations
  • HubSpot deal note with compact win/loss summary and Notion link
  • DUAL-MODEL architecture: the primary reasoning model for deep causal analysis, the analysis model for research + formatting
  • Configurable: deal stages, competitor research toggle, Notion database
  • ITP 20 records, 14/14 milestones, $0.30-$0.60/deal measured
  • All sales final after download

Frequently Asked Questions

How does it differ from Lost Deal Re-Activation Agent?+

Different timing and purpose. WLIA analyzes WHY deals were won or lost at the moment of closure — 6-factor causal analysis with timeline reconstruction. LDRA monitors lost deals 30-90 days later for condition changes that create re-engagement opportunities.

What are the six win/loss factors?+

product_fit — how well the product matched the prospect's requirements and use case. sales_execution — quality of the sales process, responsiveness, demo quality, follow-up cadence. competitive_dynamics — impact of competitors on the deal outcome.

What is the factor classification system?+

Each of the 6 factors is classified as MAJOR (primary driver of the deal outcome), CONTRIBUTING (played a meaningful role but was not the primary driver), or NOT A FACTOR (did not materially influence the outcome). Classifications are evidence-based — the Analyst cites specific activities, emails, meetings, and deal events from the HubSpot timeline to support each classification.

Why does the Analyst use Opus instead of Sonnet?+

The Analyst performs deep causal reasoning: reconstructing deal timelines from activity data, identifying causal relationships between sales actions and deal outcomes, classifying 6 factors with evidence citations, and generating strategic lessons and recommendations. This requires the reasoning depth of the primary reasoning model. The Researcher and Formatter use the analysis model because research gathering and output formatting are classification-level tasks.

Does it analyze both won and lost deals?+

Yes. The webhook fires on both Closed Won and Closed Lost stages (configurable via DEAL_STAGES_CLOSED_WON and DEAL_STAGES_CLOSED_LOST). Won deals reveal what worked and should be replicated.

When does it use web_search?+

Only when INCLUDE_COMPETITOR_RESEARCH=true AND the deal has a competitor field populated. The Researcher uses Anthropic web_search to gather company background, competitive landscape, and recent news to enrich the Analyst's context. When disabled or when no competitor is identified, the pipeline skips web research and analyzes based on HubSpot data alone.

How does it relate to Deal Competitor Tracker?+

Complementary products covering different timing in the deal lifecycle. DCT generates battle cards with talk tracks and objection handlers during active deals when a competitor is identified. WLIA analyzes competitive dynamics as one of 6 win/loss factors after the deal closes.

What outputs are generated?+

Two outputs per deal: (1) Notion intelligence brief page with executive summary, reconstructed deal timeline, per-factor analysis with MAJOR/CONTRIBUTING/NOT A FACTOR badges, lessons learned, and actionable recommendations. (2) HubSpot deal note with compact win/loss summary highlighting key factors and a link to the full Notion brief.

Is there a refund policy?+

All sales are final after download. Review the Blueprint Dependency Matrix and prerequisites before purchase. Questions?

Read the full guide →

Related Blueprints