Skip to main content

Run a skills-based knowledge chatbot with Google Sheets and GPT-4o-mini

Workflow preview

Workflow preview
100%
Run a skills-based knowledge chatbot with Google Sheets and GPT-4o-mini preview
Open on n8n.io

1. Workflow Overview

Quick overview This workflow creates a session based chatbot in n8n Chat that loads “skills” from Google Sheets and uses OpenAI GPT 4o mini to respond strictly according to the matched skill’s trig...

Best for

  • Internal Wiki automation workflows
  • AI Chatbot automation workflows
  • intermediate n8n builders looking for reusable templates

Tools used

n8n-nodes-base.stickynote, @n8n/n8n-nodes-langchain.chattrigger, n8n-nodes-base.googlesheets, n8n-nodes-base.code, @n8n/n8n-nodes-langchain.agent, @n8n/n8n-nodes-langchain.lmchatopenai, @n8n/n8n-nodes-langchain.memorybufferwindow, @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 Incrementors.

Original n8n.io source

1.1 Workflow description

Title
Run a skills-based knowledge chatbot with Google Sheets and GPT-4o-mini
Workflow name
Run a skills-based knowledge chatbot with Google Sheets and GPT-4o-mini

Quick overview

This workflow creates a session-based chatbot in n8n Chat that loads “skills” from Google Sheets and uses OpenAI GPT-4o-mini to respond strictly according to the matched skill’s trigger phrases and instructions.

How it works

  1. Receives each message from the built-in n8n Chat trigger.
  2. Retrieves all rows from a Google Sheets document that contains a Skills tab.
  3. Filters the rows to skills marked Active = Yes and formats them into a structured skills context for the agent.
  4. Uses an OpenAI GPT-4o-mini powered agent with session memory to match the user message to the best skill via trigger phrases and generate a response that follows the skill instructions exactly.
  5. Sends the agent’s output back to the n8n chat interface.

Setup

  1. Create a Google Sheet with a Skills tab and columns for Skill Name, Trigger Phrases, Instructions, Example Output, and Active (set to Yes for enabled skills).
  2. Add a Google Sheets OAuth credential and replace YOUR_SKILLS_SHEET_ID with your spreadsheet ID.
  3. Add an OpenAI credential and ensure the model is set to gpt-4o-mini.
  4. Activate the workflow and use the Chat Trigger URL to start a conversation.

Requirements

  • Active n8n instance (self-hosted or cloud)
  • OpenAI account with GPT-4o-mini API access
  • Google Sheets with a tab named Skills — column headers must be added before the first run
  • At least one skill row with Active set to Yes before testing

Customization

  • Add more skills at any time — open your Google Sheet, add a new row with a skill name, trigger phrases, instructions, and set Active to Yes — the change takes effect on the next chat message with no workflow changes needed
  • Swap GPT-4o-mini for a different model — open the OpenAI — GPT-4o-mini step and change the model selection to gpt-4o or gpt-4.1-mini depending on the response quality and cost balance you need
  • Add a fallback email alert for unmatched messages — after node 5. Respond to Chat, add a Gmail step with an IF check that fires when the response contains the fallback message text, sending you an email with the unmatched question so you can add a new skill to cover it
  • Change the session memory window — open the Session Memory step and adjust the window size to store more or fewer previous messages in the conversation context — a larger window improves multi-turn follow-ups but uses more tokens
  • Add a Slack interface instead of the built-in chat — replace node 1. Chat Trigger with a Slack trigger that listens for messages in a specific channel, so your team can use the skills chatbot directly from Slack without opening n8n

Additional info

Trigger phrases drive skill matching — the more specific and varied your trigger phrases are, the more accurately the agent picks the right skill. For example, instead of just "email" use "cold email, outreach email, sales email, prospecting email" to cover different ways users might phrase the same request.

If a user message could match multiple skills, the agent picks the most relevant one based on the full message context. If you notice the wrong skill being selected, make the trigger phrases of each skill more distinct from each other.

The Active column controls which skills are loaded on each run. Setting a row to anything other than Yes — including No, Inactive, or leaving it blank — silently excludes it. You can use this to turn skills on and off without deleting them.

The workflow reads the full Skills tab on every single chat message. For large skill sheets with many rows this adds a small delay. If you have more than 50 skills and notice slow responses, consider archiving inactive skills to a separate tab to keep the active tab lean.

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 - Overview

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

Block 2 - Section — Chat Trigger

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

Block 3 - Section — Active Skills Load

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

Block 4 - Section — Skills Format, AI Agent Execution, and Chat Response

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

Block 5 - 1. Chat Trigger

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

Block 6 - 2. Google Sheets — Load Active Skills

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

Block 7 - 3. Code — Format Skills for Agent

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

Block 8 - 4. AI Agent — Skills Executor

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

Block 9 - OpenAI — GPT-4o-mini Model

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

Block 10 - Session Memory

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

Block 11 - 5. Respond to Chat

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

3. Summary Table

Workflow Run a skills-based knowledge chatbot with Google Sheets and GPT-4o-mini
Complexity intermediate
Nodes 11
Categories Internal Wiki, AI Chatbot
Author Incrementors
Published 04 Jun 2026

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/16117/16117.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 Run a skills-based knowledge chatbot with Google Sheets and GPT-4o-mini do?

Quick overview This workflow creates a session based chatbot in n8n Chat that loads “skills” from Google Sheets and uses OpenAI GPT 4o mini to respond strictly according to the matched skill’s trig...

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 Internal Wiki, AI Chatbot use case.