Skip to main content

Query and answer questions from Excel spreadsheets with GPT-4 Mini

Workflow preview

Workflow preview
100%
Query and answer questions from Excel spreadsheets with GPT-4 Mini preview
Open on n8n.io

Important notice

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

1. Workflow Overview

This workflow creates an intelligent chatbot that uses your Microsoft Excel workbooks as a knowledge base. The AI agent can automatically query your Excel spreadsheets to provide accurate, contextu...

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

Source and attribution

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

Original n8n.io source

1.1 Workflow description

Title
Query and answer questions from Excel spreadsheets with GPT-4 Mini
Workflow name
Query and answer questions from Excel spreadsheets with GPT-4 Mini

This workflow creates an intelligent chatbot that uses your Microsoft Excel workbooks as a knowledge base. The AI agent can automatically query your Excel spreadsheets to provide accurate, contextual responses based on your stored data and information.

Who's it for

This template is perfect for:

  • Business teams who maintain their knowledge base in Excel spreadsheets
  • Organizations with existing data and processes in Microsoft 365
  • Small businesses using Excel for inventory, customer data, or documentation
  • Teams wanting to make their Excel data conversationally accessible without complex database setup
  • Companies looking to leverage familiar Excel workflows with AI capabilities

How it works

The workflow combines OpenAI's language model with Microsoft Excel's spreadsheet capabilities to create a smart chatbot. When users ask questions, the AI agent automatically determines which Excel worksheets and data ranges are relevant and uses that information to generate helpful responses. The system maintains conversation history for natural, contextual interactions.

How to set up

  1. Add your credentials:

    • Configure your Microsoft Excel (Office 365) credentials in the Get Excel Data node
    • Set up your OpenAI API credentials in the OpenAI Chat Model node
  2. Configure your Excel connection:

    • Click the Get Excel Data node
    • Select your Excel workbook containing your knowledge base data
    • The AI will automatically determine relevant worksheets and data ranges
  3. Customize the AI model:

    • Open the OpenAI Chat Model node
    • Choose your preferred model (GPT-4, GPT-3.5-turbo, etc.)
    • Adjust token limits if needed
  4. Test the chatbot:

    • Click the Chat button to start a conversation
    • Ask questions related to your Excel data
  5. Optional - Make it public:

    • Enable public access in the Chat Trigger node
    • Embed the provided code into your website

Requirements

  • n8n instance (cloud or self-hosted)
  • Microsoft 365 account with Excel Online access
  • Excel workbooks with data you want to query
  • OpenAI API key with available credits
  • Microsoft Graph API permissions for Excel access

How to customize the workflow

Change the AI Provider: You can replace the OpenAI Chat Model with other providers like Anthropic Claude, Google Gemini, or local models by swapping the language model node.

Adjust Context Window: Modify the "Remember Chat History" node to increase or decrease how many previous messages the AI remembers (default is 10 interactions).

Update System Instructions: Edit the Smart AI Agent's system message to change how the assistant behaves or add specific instructions for your use case.

Connect Multiple Workbooks: Add additional Get Excel Data nodes to give the AI access to multiple Excel workbooks within your Microsoft 365 environment.

Add Data Validation: Include nodes to validate Excel data format and structure before processing to ensure consistent AI responses.

Add More Tools: Extend the AI agent with additional tools like web search, email sending, or integration with other Microsoft 365 services.

Workflow Structure

Chat Trigger → Smart AI Agent ← OpenAI Chat Model
                     ↓
              Get Excel Data
                     ↑
           Remember Chat History

The Smart AI Agent orchestrates the conversation, deciding when to query Excel and how to use the retrieved data in responses. The memory buffer ensures natural conversation flow by maintaining context across interactions.

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 Note1

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

Block 2 - Sticky Note2

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

Block 3 - Sticky Note3

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

Block 4 - Sticky Note

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

Block 5 - OpenAI Chat Model

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

Block 6 - Start Chat Conversation

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

Block 7 - Smart AI Agent

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

Block 8 - Remember Chat History

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

Block 9 - Get Excel Data

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

3. Summary Table

Workflow Query and answer questions from Excel spreadsheets with GPT-4 Mini
Complexity intermediate
Nodes 9
Categories Internal Wiki, AI Chatbot
Author Gegenfeld
Published 29 Jul 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/6624/6624.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 Query and answer questions from Excel spreadsheets with GPT-4 Mini do?

This workflow creates an intelligent chatbot that uses your Microsoft Excel workbooks as a knowledge base. The AI agent can automatically query your Excel spreadsheets to provide accurate, contextu...

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.