AutomationFlowsAI & RAG › Comp Company Chatbot V3

Comp Company Chatbot V3

Comp_Company_Chatbot_V3. Uses chatTrigger, agent, memoryBufferWindow, googleSheetsTool. Chat trigger; 6 nodes.

Chat trigger trigger★★☆☆☆ complexityAI-powered6 nodesChat TriggerAgentMemory Buffer WindowGoogle Sheets ToolGmail ToolLm Chat Xai Grok
AI & RAG Trigger: Chat trigger Nodes: 6 Complexity: ★★☆☆☆ AI nodes: yes Added:

This workflow follows the Agent → Chat Trigger recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "name": "Comp_Company_Chatbot_V3",
  "nodes": [
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        -540,
        -100
      ],
      "id": "35bc075e-53bc-4c57-b86a-71b6f3bd7915",
      "name": "When chat message received"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.chatInput }}",
        "options": {
          "systemMessage": "You represent a Computer company. Please answer customer inquiries using the information provided in the Google Sheet. Please send an email to the owner only if the customer requests to purchase a device. Before sending the email, ask the customer for their name and phone number, and send them to the owner via Email."
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        -240,
        -100
      ],
      "id": "1041b2f2-d3ac-4d2a-8ae2-879bd02f6158",
      "name": "AI Agent"
    },
    {
      "parameters": {},
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        -140,
        120
      ],
      "id": "e666aa36-1405-46cc-a08e-8745c9e8a899",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1gkBZNwtyq3a_OZA0_V40tlHXcDKGjBlOB0oCZ0447bw",
          "mode": "list",
          "cachedResultName": "V1_Company_DataBase",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gkBZNwtyq3a_OZA0_V40tlHXcDKGjBlOB0oCZ0447bw/edit?usp=drivesdk"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/1gkBZNwtyq3a_OZA0_V40tlHXcDKGjBlOB0oCZ0447bw/edit#gid=0"
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        40,
        140
      ],
      "id": "7bc2e378-16ae-43d1-ad09-b321bd1ba489",
      "name": "Get row(s) in sheet in Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "mramelshamy408@gmail.com",
        "subject": "Customer Purchase Request",
        "emailType": "text",
        "message": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Message', ``, 'string') }}",
        "options": {}
      },
      "type": "n8n-nodes-base.gmailTool",
      "typeVersion": 2.1,
      "position": [
        240,
        60
      ],
      "id": "e403f235-3766-4fd2-b95b-ecb77485f32d",
      "name": "Send a message in Gmail",
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "model": "grok-4-0709",
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatXAiGrok",
      "typeVersion": 1,
      "position": [
        -420,
        120
      ],
      "id": "f6de7cca-6c76-45c2-9d45-ca7f94c31852",
      "name": "xAI Grok Chat Model",
      "credentials": {
        "xAiApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "When chat message received": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Get row(s) in sheet in Google Sheets": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Send a message in Gmail": {
      "ai_tool": [
        [
          {
            "node": "AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "xAI Grok Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "e13d6e98-0fa7-44e8-82af-741f939a8c58",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "id": "zqTYWHsUCcFhDkmm",
  "tags": []
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Comp_Company_Chatbot_V3. Uses chatTrigger, agent, memoryBufferWindow, googleSheetsTool. Chat trigger; 6 nodes.

Source: https://github.com/MohElshamy1994/n8n-course-Projetcs/blob/f37fce8a58c6e943ea6021f17a9768c72abc71fa/workflows/26_Comp_Company_Chatbot_Grok4.json — original creator credit. Request a take-down →

More AI & RAG workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

AI & RAG

Use cases are many: Automate Gmail tasks such as sending, replying, labeling, deleting, and fetching emails — all with AI assistance. Perfect for YouTubers managing viewer emails, sales teams handling

Chat Trigger, Agent, Gmail Tool +3
AI & RAG

2a Intelligent AI Assistant DONE. Uses chatTrigger, agent, lmChatOpenAi, memoryBufferWindow. Chat trigger; 8 nodes.

Chat Trigger, Agent, OpenAI Chat +4
AI & RAG

AI Agent. Uses chatTrigger, agent, lmChatOpenAi, memoryBufferWindow. Chat trigger; 7 nodes.

Chat Trigger, Agent, OpenAI Chat +3
AI & RAG

Digital Marketer Agent. Uses chatTrigger, agent, memoryBufferWindow, googleSheetsTool. Chat trigger; 7 nodes.

Chat Trigger, Agent, Memory Buffer Window +3
AI & RAG

Medical_Company_Chatbot. Uses chatTrigger, agent, lmChatOpenAi, memoryBufferWindow. Chat trigger; 6 nodes.

Chat Trigger, Agent, OpenAI Chat +3