Skip to main content

Analyze sales deal outcomes with Azure OpenAI and Google Sheets reporting

Workflow preview

Workflow preview
100%
Analyze sales deal outcomes with Azure OpenAI and Google Sheets reporting preview
Open on n8n.io

Important notice

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

1. Workflow Overview

Description: Turn raw sales deal outcomes into actionable insights with this smart n8n workflow template! Automatically pull deal data from Google Sheets, analyze won/lost reasons with AI, generate...

Best for

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

Tools used

n8n-nodes-base.code, n8n-nodes-base.googlesheets, n8n-nodes-base.emailsend, n8n-nodes-base.manualtrigger, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatazureopenai, n8n-nodes-base.splitinbatches, n8n-nodes-base.set

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Analyze sales deal outcomes with Azure OpenAI and Google Sheets reporting
Workflow name
Analyze sales deal outcomes with Azure OpenAI and Google Sheets reporting

Description:

Turn raw sales deal outcomes into actionable insights with this smart n8n workflow template! Automatically pull deal data from Google Sheets, analyze won/lost reasons with AI, generate structured insights, and deliver polished weekly reports—no manual effort needed.

This automation connects to your sales feedback sheet, processes deal outcomes with an AI model, classifies win/loss reasons, summarizes key patterns, and creates professional HTML email digests. The enriched insights are stored in Google Sheets and shared via automated email reports—giving sales, product, and leadership teams a clear view of what drives success or loss.

What This Template Does: 📊 Captures sales deal outcomes from Google Sheets 🧠 Uses AI to analyze win/loss reasons and extract themes 📂 Categorizes top won & lost patterns for each deal 📝 Summarizes deal insights into structured JSON 📈 Stores enriched insights in a dedicated Google Sheet 📧 Generates and sends a polished HTML weekly digest email 🌟 100% automated: from data collection to insights reporting

Built-in Logic Ensures:

✔️ Clean JSON-based AI output (won reasons, lost reasons, patterns) ✔️ Original deal details remain tied to AI insights ✔️ Weekly digest emails include structured summaries & recommendations

Requirements:

  • Google Sheets with deal outcome data (won/lost + reasons)
  • Google Sheets account for storing enriched insights
  • Azure OpenAI (or compatible) account for AI analysis
  • n8n instance (self-hosted or cloud)

Setup Instructions:

  • Google Sheets Node: Connect to your sales feedback sheet and fetch all deal data.
  • Clean Data: Use a Code or Set node to remove extra fields and format data.
  • Loop Over Deals: Add a Loop Over Items node for individual analysis.
  • AI Analysis: Use Azure OpenAI Chat Model to extract win/loss reasons and patterns.
  • Parse Results: Add a Parse AI Response node to structure insights.
  • Store Insights: Save enriched results back to Google Sheets.
  • Generate Report: Fetch processed data and use AI to create an HTML email summary.
  • Send Email: Deliver the report using an Email node.

Perfect For:

  • Sales teams analyzing why deals are won or lost
  • Product managers learning from customer objections & success drivers
  • Leadership teams tracking patterns in deal performance
  • Analysts turning unstructured feedback into scalable insights

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 - Extract Notes/Emails

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

Block 2 - Parse AI Response

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

Block 3 - Save to Google Sheets

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

Block 4 - Fetch Google Sheet Data

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

Block 5 - Filter Recent Data

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

Block 6 - Send Email Digest

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

Block 7 - When clicking ‘Execute workflow’

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

Block 8 - Get row(s) in sheet

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

Block 9 - AI Agent

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

Block 10 - Azure OpenAI Chat Model

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

Block 11 - Loop Over Items

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

Block 12 - Edit Fields

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

Block 13 - AI Agent1

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

Block 14 - Azure OpenAI Chat Model1

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

Block 15 - Sticky Note

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

Block 16 - Sticky Note1

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

Block 17 - Sticky Note2

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

Block 18 - Sticky Note3

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

Block 19 - Sticky Note4

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

Block 20 - Sticky Note5

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

Block 21 - Sticky Note6

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

Block 22 - Sticky Note7

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

Block 23 - Sticky Note8

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

Block 24 - Sticky Note9

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

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

3. Summary Table

Workflow Analyze sales deal outcomes with Azure OpenAI and Google Sheets reporting
Complexity advanced
Nodes 28
Categories CRM, AI Summarization
Author Rahul Joshi
Published 11 Sept 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/8479/8479.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 sales deal outcomes with Azure OpenAI and Google Sheets reporting do?

Description: Turn raw sales deal outcomes into actionable insights with this smart n8n workflow template! Automatically pull deal data from Google Sheets, analyze won/lost reasons with AI, generate...

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.