Skip to main content

Sales CRM chatbot with GPT-4o-mini, Google Sheets lookup & memory

Workflow preview

Workflow preview
100%
Sales CRM chatbot with GPT-4o-mini, Google Sheets lookup & memory 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: This workflow creates a fully interactive AI powered Sales CRM Chatbot inside n8n, capable of understanding user queries, searching Google Sheets for CRM data, and responding intell...

Best for

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

Tools used

@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.lmchatopenai, n8n-nodes-base.googlesheetstool, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.memorybufferwindow, n8n-nodes-base.if, n8n-nodes-base.googlesheets, @n8n/n8n-nodes-langchain.chat

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
Sales CRM chatbot with GPT-4o-mini, Google Sheets lookup & memory
Workflow name
Sales CRM chatbot with GPT-4o-mini, Google Sheets lookup & memory

📘 Description:

This workflow creates a fully interactive AI-powered Sales CRM Chatbot inside n8n, capable of understanding user queries, searching Google Sheets for CRM data, and responding intelligently based on real records. It integrates GPT-4o-mini with two live data sources—Outreach Automation Sheet and GHL Opportunity Database—allowing the bot to answer questions about leads, contact details, proposal links, outreach status, and opportunity information. The bot follows strict rules: it never guesses data, always performs lookups before answering, and remembers short-term conversation history for multi-turn chats. Every interaction is logged into a “chat_memory” sheet, while invalid responses are captured separately for debugging. The result is a real-time Sales Assistant Chat Interface that combines AI reasoning, structured tool calls, CRM lookups, and persistent memory.

⚙️ What This Workflow Does (Step-by-Step)

▶️ When Chat Message Received (Chat Trigger) Starts the workflow whenever a user sends a message in the n8n Chat UI. Captures chatInput, session ID, and context for the conversation.

🧠 OpenAI Chat Model (GPT-4o-mini) Provides the AI reasoning engine used by the Sales CRM Router. Handles intent detection, tool-call planning, data interpretation, and conversational flow.

🤖 AI Sales CRM Router (Agent Node) The brain of the system. Responsibilities: Understand user intent Identify if a lookup is required Automatically call the correct Google Sheets tool Enforce strict “lookup before answer” rules Produce structured, helpful responses Ask for missing details when lookup fails Uses JSON-formatted tool-calls exactly as defined in the system prompt.

📂 Google Sheets Tool — Outreach Sheet Queries the outreach automation sheet. Used when user asks about: Lead status Outreach progress Proposal links Contact email/name lookup Follow-up details

📂 Google Sheets Tool — Opportunity Sheet Queries the ghl database sheet. Used for: GHL opportunity details Pipeline stage Deal value Assigned representative Company details

🧠 Conversation Memory Buffer (Short-Term Memory) Stores the last 7 conversational turns. Allows multi-turn interactions where the AI remembers previous questions and context within a session.

🔍 Validate AI Output Payload (IF Node) Ensures the AI produced a valid output. ✅ If valid → saved to chat memory + returned to user ❌ If invalid → logged for review in error sheet

🗂️ Write Chat Memory to Google Sheets Appends: Timestamp Session ID User message AI response to the chat_memory sheet. Creates a complete audit trail for every conversation.

⚠️ Log Invalid Chat Records to Google Sheets Captures failed or empty responses. Helps debug incorrect tool calls or malformed AI outputs.

💬 Send Chat Response Delivers the AI’s final message back to the user instantly in the n8n chat window.

🧩 Prerequisites

OpenAI GPT-4o-mini API key Google Sheets OAuth (Techdome account) Structured Outreach Automation & GHL Opportunity sheets n8n Chat UI enabled

💡 Key Benefits

✅ Real-time lead + opportunity lookup directly inside chat ✅ Fail-safe, rule-driven AI that never “hallucinates” data ✅ Multi-turn memory for natural conversation ✅ All chats logged for training and QA ✅ Perfect internal CRM companion for sales teams

👥 Perfect For

Sales teams needing instant CRM insights Outreach teams checking proposal status SDRs handling lead follow-ups Anyone wanting AI-assisted CRM conversations inside n8n

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 - When chat message received

Type / Role
@n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
Config choices
Version 1.3

Block 2 - OpenAI Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatOpenAi - lmChatOpenAi
Config choices
Version 1.2

Block 3 - outreachSheet

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

Block 4 - opportunitySheet

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

Block 5 - AI Sales CRM Router

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

Block 6 - Conversation Memory Buffer

Type / Role
@n8n/n8n-nodes-langchain.memoryBufferWindow - memoryBufferWindow
Config choices
Version 1.3

Block 7 - Validate AI Output Payload

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

Block 8 - Log Invalid Chat Records to Google Sheets

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

Block 9 - Write Chat Memory to Google Sheets

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

Block 10 - Send Chat Response

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

Block 11 - Sticky Note

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

Block 12 - Sticky Note1

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

Block 13 - Sticky Note2

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

Block 14 - Sticky Note3

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

Block 15 - Sticky Note4

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

Block 16 - Sticky Note5

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

Block 17 - Sticky Note6

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

Block 18 - Sticky Note7

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

Block 19 - Sticky Note8

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

Block 20 - Sticky Note9

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

Block 21 - Sticky Note10

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

3. Summary Table

Workflow Sales CRM chatbot with GPT-4o-mini, Google Sheets lookup & memory
Complexity advanced
Nodes 21
Categories CRM, AI Chatbot
Author Rahul Joshi
Published 14 Nov 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/10840/10840.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 Sales CRM chatbot with GPT-4o-mini, Google Sheets lookup & memory do?

Description: This workflow creates a fully interactive AI powered Sales CRM Chatbot inside n8n, capable of understanding user queries, searching Google Sheets for CRM data, and responding intell...

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 Chatbot use case.