Skip to main content

Analyze lost HubSpot deals and generate revival strategies with OpenAI

Workflow preview

Workflow preview
100%
Analyze lost HubSpot deals and generate revival strategies with OpenAI preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

How it works This workflow runs on a daily schedule to analyze all Closed–Lost deals from your CRM and uncover the true reason behind each loss. It uses AI to classify the primary loss category, ge...

Best for

  • CRM automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, n8n-nodes-base.scheduletrigger, n8n-nodes-base.hubspot, n8n-nodes-base.if, n8n-nodes-base.set, n8n-nodes-base.code, n8n-nodes-base.slack, n8n-nodes-base.merge

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Avkash Kakdiya.

Original n8n.io source

1.1 Workflow description

Title
Analyze lost HubSpot deals and generate revival strategies with OpenAI
Workflow name
Analyze lost HubSpot deals and generate revival strategies with OpenAI

How it works

This workflow runs on a daily schedule to analyze all Closed–Lost deals from your CRM and uncover the true reason behind each loss. It uses AI to classify the primary loss category, generate a confidence-backed explanation, and then create a realistic re-engagement strategy for every deal. All insights are consolidated into leadership-ready email and Slack summaries. Every analyzed deal and revival plan is logged for long-term tracking and audits.

Step-by-step

  • Trigger and fetch lost deals

    • Schedule Trigger – Runs the workflow automatically at a defined time.
    • Get many deals – Fetches all deal records from the CRM.
    • If – Filters only deals marked as Closed–Lost.
    • Edit Fields – Standardizes key deal attributes like amount, industry, owner, and loss reason.
  • Analyze loss reasons and generate revival strategies

    • Brief Explanation Creator – Uses AI to identify the primary loss category with confidence.
    • Code in JavaScript – Parses and normalizes AI loss analysis output.
    • Merge – Combines deal data with loss insights.
    • Feedback Creator – Generates a practical re-engagement strategy for each lost deal.
    • Code in JavaScript7 – Parses and safeguards revival strategy outputs.
    • Merge4 – Merges deal details, loss analysis, and revival strategy into one final dataset.
  • Report, notify, and store results

    • Code in JavaScript11 – Builds a consolidated HTML summary email.
    • Send a message4 – Sends the summary to stakeholders via email.
    • Code in JavaScript12 – Creates a structured Slack summary.
    • Send a message1 – Delivers insights to a Slack channel.
    • Code in JavaScript10 – Reconstructs final data with delivery status.
    • Append or update row in sheet – Logs all results into Google Sheets for audit and tracking.

Why use this?

  • Turns lost deals into actionable learning instead of static CRM records
  • Gives sales teams clear, realistic re-engagement plans without manual analysis
  • Provides leadership with concise, decision-ready summaries
  • Creates a historical database of loss reasons and revival outcomes
  • Improves pipeline recovery while enforcing consistent sales intelligence

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Sticky Note

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 2 - Sticky Note1

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 3 - Sticky Note2

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 4 - Sticky Note3

Type / Role
n8n-nodes-base.stickyNote - stickyNote
Config choices
Version 1

Block 5 - Schedule Trigger

Type / Role
n8n-nodes-base.scheduleTrigger - scheduleTrigger
Config choices
Version 1.3

Block 6 - Get many deals

Type / Role
n8n-nodes-base.hubspot - hubspot
Config choices
Version 2.2

Block 7 - If

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.3

Block 8 - Edit Fields

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 9 - Code in JavaScript

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 10 - Code in JavaScript1

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 11 - Send a message1

Type / Role
n8n-nodes-base.slack - slack
Config choices
Version 2.4

Block 12 - Merge

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 13 - Merge1

Type / Role
n8n-nodes-base.merge - merge
Config choices
Version 3.2

Block 14 - Send a message2

Type / Role
n8n-nodes-base.gmail - gmail
Config choices
Version 2.2

Block 15 - Code in JavaScript4

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Append or update row in sheet1

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.7

Block 17 - Code in JavaScript7

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 18 - Code in JavaScript2

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 19 - Brief Explanation Creator

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2.1

Block 20 - Feedback Creator

Type / Role
@n8n/n8n-nodes-langchain.openAi - openAi
Config choices
Version 2.1

3. Summary Table

Workflow Analyze lost HubSpot deals and generate revival strategies with OpenAI
Complexity advanced
Nodes 20
Categories CRM, AI Summarization
Author Avkash Kakdiya
Published 31 Dec 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/12328/12328.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Analyze lost HubSpot deals and generate revival strategies with OpenAI do?

How it works This workflow runs on a daily schedule to analyze all Closed–Lost deals from your CRM and uncover the true reason behind each loss. It uses AI to classify the primary loss category, ge...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your CRM, AI Summarization use case.