Skip to main content

Notify HubSpot deal stage changes with OpenAI, Slack and Gmail

Workflow preview

Workflow preview
100%
Notify HubSpot deal stage changes with OpenAI, Slack and Gmail preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow triggers on HubSpot dealstage changes, pulls full deal, contact, and owner details, uses OpenAI to generate a concise Slack ready update with next steps, notifies the r...

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.hubspottrigger, n8n-nodes-base.if, n8n-nodes-base.hubspot, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.openai, n8n-nodes-base.slack, n8n-nodes-base.googlesheets

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
Notify HubSpot deal stage changes with OpenAI, Slack and Gmail
Workflow name
Notify HubSpot deal stage changes with OpenAI, Slack and Gmail

Quick overview

This workflow triggers on HubSpot dealstage changes, pulls full deal, contact, and owner details, uses OpenAI to generate a concise Slack-ready update with next steps, notifies the right Slack channel or emails the owner for ClosedWon, logs the event to Google Sheets, and writes a note back to HubSpot.

How it works

  1. Triggers in HubSpot whenever a deal property changes and continues only when the changed property is the deal stage.
  2. Retrieves the full deal record from HubSpot, formats key fields (stage label, value, close date, won/lost flags), and builds an AI prompt.
  3. Sends the prompt to OpenAI to generate a 3–4 sentence stage-change summary with two actionable next steps.
  4. Posts the AI summary to Slack, routing high-value deals to a leadership channel and other deals to the sales team channel.
  5. Appends a structured log entry (deal, stage, owner/contact, value, close date, AI summary, timestamp) to Google Sheets.
  6. Fetches the HubSpot owner and contact details to enrich downstream messages, then sends a Gmail congratulations email for Closed Won deals or a Slack loss alert with the loss reason for Closed Lost deals.
  7. Creates a note in HubSpot containing the stage-change notification and AI summary, and associates the note with the deal.

Setup

  1. Connect your HubSpot Trigger credentials and add an HTTP header auth credential for HubSpot API calls to owners, contacts, notes creation, and note-to-deal association endpoints.
  2. Connect your OpenAI credential and select a model in the OpenAI node.
  3. Connect your Slack OAuth2 credential and update the target channels/messages for leadership, sales, loss alerts, and error alerts.
  4. Connect your Gmail credential for sending Closed Won emails and ensure deal owners in HubSpot have an email address.
  5. Connect your Google Sheets credential and replace the document ID with your spreadsheet ID (and confirm the target sheet name and columns).

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 - Sticky Note4

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

Block 6 - Sticky Note5

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

Block 7 - Sticky Note6

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

Block 8 - HubSpot Trigger

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

Block 9 - Is Real Stage Change?

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

Block 10 - Get Deal Details

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

Block 11 - Format Deal Data

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

Block 12 - Generate AI Summary

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

Block 13 - High Value Deal?

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

Block 14 - Slack - Leadership Channel

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

Block 15 - Slack - Sales Team Channel

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

Block 16 - Log to Google Sheets

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

Block 17 - Get Owner Details

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 18 - Get Contact Details

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Block 19 - Merge Deal Context

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

Block 20 - Build Enriched Context

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

Block 21 - Won / Lost / Other?

Type / Role
n8n-nodes-base.switch - switch
Config choices
Version 3

Block 22 - Gmail - Congrats to Owner

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

Block 23 - Slack - Loss Alert to Management

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

Block 24 - Create HubSpot Note on Deal

Type / Role
n8n-nodes-base.httpRequest - httpRequest
Config choices
Version 4.2

Showing the first 24 of 26 workflow blocks. Download the JSON for the full node graph.

3. Summary Table

Workflow Notify HubSpot deal stage changes with OpenAI, Slack and Gmail
Complexity advanced
Nodes 26
Categories CRM, AI Summarization
Author Avkash Kakdiya
Published 03 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16076/16076.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 Notify HubSpot deal stage changes with OpenAI, Slack and Gmail do?

Quick overview This workflow triggers on HubSpot dealstage changes, pulls full deal, contact, and owner details, uses OpenAI to generate a concise Slack ready update with next steps, notifies the r...

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.