product guideMar 16, 2026·12 min read

How Win/Loss Intelligence Agent Reconstructs Deal Timelines

By Jonathan Stocco, Founder

The Problem

Your sales team has 47 deals in the proposal stage. 12 have not had contact in 5+ days. Three have gone completely dark. Which ones are at risk — and which ones just have a slow procurement process? A rep answering this question manually checks Hubspot, Notion, cross-references email history, and makes a judgment call on each deal. At 15 minutes per deal, that is 30–60 minutes per cycle of triage before any follow-up happens.

The cost is not just time — it is revenue leakage. Deals slip because signals were missed. Pipeline reviews rely on data that was accurate two days ago. Scoring criteria drift between team members, and the CRM becomes a lagging indicator rather than an operational tool. Win/Loss Intelligence Agent automates the sales intelligence and deal intelligence workflow from data extraction through analysis to structured output, with zero manual CRM entry.

INFO

Teams typically spend 30–60 minutes per cycle on the manual version of this workflow. Win/Loss Intelligence Agent reduces that to seconds per execution, with consistent output quality and zero CRM data entry.

What This Blueprint Does

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

The Win/Loss Intelligence Agent pipeline runs 4 agents in sequence. Fetcher pulls data from Hubspot and Notion, and Formatter delivers the output. Here is what happens at each stage and why it matters.

  • Fetcher (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.
  • Researcher (Tier 2 Classification + web_search): the analysis model with web_search gathers company and competitor context when INCLUDE_COMPETITOR_RESEARCH=true and competitor field is populated.
  • Analyst (Tier 1 Reasoning): the primary reasoning model performs deep 6-factor causal win/loss analysis: product_fit, sales_execution, competitive_dynamics, pricing_value, champion_engagement, timing_market.
  • Formatter (Tier 2 Classification): 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).

When the pipeline completes, you get structured output that is ready to act on. The blueprint bundle includes everything needed to deploy, configure, and customize the workflow:

  • 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

Scoring thresholds, output destinations, and CRM field mappings are configurable in the system prompts — no workflow JSON edits required. This means Win/Loss Intelligence Agent adapts to your specific process, terminology, and integration requirements without forking the entire workflow.

TIP

Every agent prompt is a standalone text file. Customize scoring thresholds, qualification criteria, and output formatting without touching the workflow JSON.

How the Pipeline Works

Understanding how the pipeline works helps you customize it for your environment and troubleshoot issues when they arise. Here is a step-by-step walkthrough of the Win/Loss Intelligence Agent execution flow.

Step 1: Fetcher

Tier: HubSpot Webhook + Code

The pipeline starts here. 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.

This stage ensures all downstream agents receive clean, validated input. If this step returns incomplete data, every downstream agent works with a degraded picture.

Step 2: Researcher

Tier: Tier 2 Classification + web_search

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.

Why this step matters: The result is a prioritized action queue, not just a data dump.

Step 3: Analyst

Tier: Tier 1 Reasoning

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.

This is where the pipeline applies judgment — not just data retrieval, but analysis.

Step 4: Formatter

Tier: Tier 2 Classification

This is the final deliverable — what lands in your inbox or dashboard. 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 entire pipeline executes without manual intervention. From trigger to output, every decision point follows a documented path. Every execution produces a traceable audit trail.

All nodes have been validated during Independent Test Protocol (ITP) testing on n8n v2.7.5. The error handling matrix in the bundle documents the recovery path for each failure mode.

INFO

This blueprint runs on your own n8n instance with your own API keys. Your CRM data never leaves your infrastructure.

Why we designed it this way

41% dead letter rate from a brace-matching parser. The model would embed JSON inside prose, or start JSON after a preamble, or include trailing text. Progressive extraction tries JSON.parse starting from each opening brace position in the string. First valid parse wins. Dead letter rate dropped from 41% to 11%.

— ForgeWorkflows Engineering

Cost Breakdown

Every metric is 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.

The primary operating cost for Win/Loss Intelligence Agent is the per-execution LLM inference cost. Based on Independent Test Protocol (ITP) testing, the measured cost is: Cost per Deal: $0.30-$0.60/deal (ITP-measured). This figure includes all API calls across all agents in the pipeline — not just the primary reasoning step, but every classification, scoring, and output generation call.

To put this in context, consider the manual alternative. A skilled team member performing the same work manually costs $50–75/hour for a sales ops analyst at a fully loaded rate (salary, benefits, tools, overhead). If the manual version of this workflow takes 30–60 minutes per cycle, the per-execution cost in human labor is significant. The blueprint executes the same pipeline for a fraction of that cost, with consistent quality and zero fatigue degradation.

Infrastructure costs are separate from per-execution LLM costs. You will need an n8n instance (self-hosted or cloud) and active accounts for the integrated services. The estimated monthly infrastructure cost is $6-$12/month (20 deals/month) + HubSpot/Notion included tiers, depending on your usage volume and plan tiers.

Quality assurance: Blueprint Quality Standard (BQS) audit result is 12/12 PASS. ITP result is 20/20 records, 14/14 milestones PASS. These are not marketing claims — they are test results from structured inspection protocols that you can review in the product documentation.

All cost and performance figures are ITP-measured — tested against real data fixtures on n8n v2.7.5 in March 2026. See the product page for full test methodology.

TIP

Monthly projection: if you run this blueprint 100 times per month, multiply the per-execution cost by 100 and add your infrastructure costs. Most teams find the total is less than one hour of manual labor per month.

What's in the Bundle

7 files — workflow JSON, 3 system prompts, TDD, and complete documentation.

When you purchase Win/Loss Intelligence Agent, you receive a complete deployment bundle. This is not a SaaS subscription or a hosted service — it is a set of files that you own and run on your own infrastructure. Here is what is included:

  • CHANGELOG.md — Version history
  • README.md — Setup and configuration guide
  • docs/TDD.md — Technical Design Document
  • system_prompts/analyst_system_prompt.md — Analyst system prompt
  • system_prompts/formatter_system_prompt.md — Formatter system prompt
  • system_prompts/researcher_system_prompt.md — Researcher system prompt
  • win_loss_intelligence_agent_v1.0.0.json — n8n workflow (main pipeline)

Start with the README.md. It walks through the deployment process step by step, from importing the workflow JSON into n8n to configuring credentials and running your first test execution. The dependency matrix lists every required service, API key, and estimated cost so you know exactly what you need before you start.

Every file in the bundle is designed to be read, understood, and modified. There is no obfuscated code, no compiled binaries, and no phone-home telemetry. You get the source, you own the source, and you control the execution environment.

Who This Is For

Win/Loss Intelligence Agent is built for Sales, Revops, Strategy teams that need to automate a specific workflow without building from scratch. If your team matches the following profile, this blueprint is designed for you:

  • You operate in a sales or revops or strategy function and handle the workflow this blueprint automates on a recurring basis
  • You have (or are willing to set up) an n8n instance — self-hosted or cloud
  • You have active accounts for the required integrations: HubSpot account (OAuth2 with deals, contacts, and engagements scopes), Notion workspace (integration token with Bearer prefix), Anthropic API key (~$0.30-$0.60/deal)
  • You have API credentials available: Anthropic API, HubSpot (OAuth2), Notion (httpHeaderAuth, Bearer prefix)
  • You are comfortable importing a workflow JSON and configuring API keys (the README guides you, but basic technical comfort is expected)

This is NOT for you if:

  • 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)

Review the dependency matrix and prerequisites before purchasing. If you are unsure whether your environment meets the requirements, contact support@forgeworkflows.com before buying.

NOTE

All sales are final after download. Review the full dependency matrix, prerequisites, and integration requirements on the product page before purchasing. Questions? Contact support@forgeworkflows.com.

Edge cases to know about

Every pipeline has boundaries. These are intentional design decisions, not oversights — understanding them helps you deploy with the right expectations and plan for edge cases in your environment.

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

This is intentional. We default to human-in-the-loop for actions that carry reputational or financial risk. Once your team has validated output accuracy over 20+ cycles, you can adjust the pipeline to auto-execute — the workflow JSON supports it, but the default is conservative.

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

We scoped this boundary after ITP testing revealed inconsistent results when the pipeline attempted this. The agents handle what they handle well — extending beyond this scope requires custom prompt engineering specific to your data shape.

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

This keeps the pipeline focused on a single workflow. Adding this capability would introduce branching logic that varies by organization, and the tradeoff between complexity and reliability was not worth it for a reusable blueprint. Fork the workflow JSON if your use case demands it.

INFO

Review the error handling matrix in the bundle for the full list of documented failure modes and recovery paths.

Getting Started

Deployment follows a structured sequence. The Win/Loss Intelligence Agent bundle is designed for the following tools: n8n, Anthropic API, HubSpot, Notion. Here is the recommended deployment path:

  1. Step 1: Import workflow and configure credentials. Import win_loss_intelligence_agent_v1_0_0.json into n8n. Configure HubSpot OAuth2 credential (deals, contacts, engagements scopes), Notion httpHeaderAuth credential (Bearer token), and Anthropic API key following the README.
  2. Step 2: Configure deal stages and research settings. Set DEAL_STAGES_CLOSED_WON and DEAL_STAGES_CLOSED_LOST to match your HubSpot pipeline stage IDs. Configure NOTION_DATABASE_ID for intelligence brief storage. Optionally set INCLUDE_COMPETITOR_RESEARCH=true for deals with competitor fields populated.
  3. Step 3: Activate and verify. Enable the workflow in n8n. Close a test deal in HubSpot (or trigger via manual Webhook with a deal ID). Verify the Notion intelligence brief page appears with 6-factor analysis and the HubSpot deal note contains a compact summary with Notion link.

Before running the pipeline on live data, execute a manual test run with sample input. This validates that all credentials are configured correctly, all API endpoints are reachable, and the output format matches your expectations. The README includes test data examples for this purpose.

Once the test run passes, you can configure the trigger for production use (scheduled, webhook, or event-driven — depending on the blueprint design). Monitor the first few production runs to confirm the pipeline handles real-world data as expected, then let it run.

For technical background on how ForgeWorkflows blueprints are built and tested, see the Blueprint Quality Standard (BQS) methodology and the Inspection and Test Plan (ITP) framework. These documents describe the quality gates every blueprint passes before listing.

Ready to deploy? View the Win/Loss Intelligence Agent product page for full specifications, pricing, and purchase.

TIP

Run a manual test with sample data before switching to production triggers. This catches credential misconfigurations and API endpoint issues before they affect real workflows.

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. WLIA produces an intelligence brief for strategic learning; LDRA produces a re-opening email for deal recovery. Together they close the loop: WLIA explains deal outcomes, LDRA acts on those insights.

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. pricing_value — price point perception relative to perceived value and budget. champion_engagement — strength and involvement of internal champions and sponsors. timing_market — external timing factors, budget cycles, market conditions.

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. The README walks through configuration in under 10 minutes, including test data for validation.

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 Opus 4.6. The Researcher and Formatter use Sonnet 4.6 because research gathering and output formatting are classification-level tasks. Review the error handling matrix in the bundle — it documents the recovery path for each failure mode.

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. Lost deals reveal what failed and should be corrected. Both produce intelligence briefs with the same 6-factor taxonomy.

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. This keeps costs at the lower end ($0.30/deal) for deals without competitor research.

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. DCT is tactical preparation; WLIA is strategic post-mortem. Together they bookend competitive intelligence across the entire deal lifecycle.

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. The README walks through configuration in under 10 minutes, including test data for validation.

Is there a refund policy?+

All sales are final after download. Review the Blueprint Dependency Matrix and prerequisites before purchase. Questions? Contact support@forgeworkflows.com before buying. Full terms at forgeworkflows.com/legal.

What should I do if the pipeline dead-letters a record?+

Check the dead letter output for the failure reason — the error context includes which agent failed and why. Common causes: missing input fields, API rate limits, or malformed data. Fix the underlying issue and reprocess. The error handling matrix in the bundle documents every failure mode and its recovery path.

Get Win/Loss Intelligence Agent

$199

View Blueprint

Related Blueprints

Related Articles

Win/Loss Intelligence Agent$199