AI Data Analyst Agent for Google Sheets Analysis (Ozki) - n8n Workflow

Deploy an interactive AI analyst agent using this advanced n8n workflow. Analyze Google Sheets data, extract KPIs, and generate structured reports using the LangChain n8n node suite and OpenAI integration.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Data Analysts seeking rapid, conversational data summaries and insight extraction.

  • Businesses aiming to automate the initial analysis of structured data via an n8n workflow.

  • Developers and users of n8n interested in building complex, stateful AI agents using the LangChain n8n node integrations.

  • Technical content creators looking for advanced n8n templates showcasing tool-use and conversational triggers.

Overview

This sophisticated n8n workflow template demonstrates the immense power of combining LangChain tooling with standard n8n nodes to create a robust, conversational AI agent. Named 'Ozki', this agent is specifically designed to tackle Google Sheets data analysis. The primary problem this n8n workflow solves is the manual effort traditionally required to extract initial insights and key performance indicators (KPIs) from raw spreadsheet data.

By leveraging this pre-built n8n workflow, users simply paste a Google Sheets URL into the chat interface. The n8n automation takes over, securely retrieving the data via the Google Sheets n8n node and using the connected OpenAI model to generate structured findings on trends, distributions, comparisons, and potential anomalies. This specific n8n workflow serves as an excellent, ready-to-use foundation for building specialized, data-focused AI tools integrated directly into your n8n environment.

How it Works


  1. Initiation (The n8n Trigger): The entire process begins with the "When chat message received" n8n trigger, a specialized LangChain node that activates the n8n workflow when a user sends an initial message (such as "Hi") to the deployed agent interface. This is the starting n8n trigger point.

  2. Orchestration and Setup Check: The Agent n8n node, the core of the logic, processes the input message. Its custom prompt logic first verifies that all necessary components (Simple Memory and Google Sheets credentials) are properly connected within the n8n template. If checks fail, it instructs the user on setup steps (using the STOP mechanism).

  3. Data Request and Analysis: Once the n8n setup is confirmed, the Agent prompts the user for the Google Sheet URL. The user provides the URL via the chat interface.

  4. Tool Execution: The Agent uses the Google Sheets n8n node (configured as a Tool) to access and retrieve the spreadsheet data defined by the URL. The underlying Large Language Model (provided by the OpenAI Model n8n node) then performs the detailed analysis on the retrieved dataset.

  5. Report Generation: The Agent structures the analysis based on predefined output categories (Key Metrics, Trends, Comparisons), intelligently tailoring suggested KPIs based on the perceived data type (e.g., Sales or Telemetry). Finally, the structured findings are presented back to the user via the chat interface, completing the interactive n8n workflow cycle.

Installation Guide


  1. Import the n8n Workflow: Copy the provided JSON code and paste it into your n8n instance using the 'New' button and selecting 'Import from JSON'.

  2. OpenAI Credentials: Locate the 'OpenAI Model' n8n node and configure your OpenAI API key credentials. This is essential for the Agent's analytical functions.

  3. Google Sheets Credentials: Locate the 'Google Sheets' n8n node tool and connect your Google Sheets account, ensuring you grant access to the documents you intend to analyze.

  4. Activate the Agent: Ensure the 'Simple Memory' n8n node is connected to the Agent's memory input. The Agent node will guide you through the initial setup if any components are missing.

  5. Start the n8n trigger: Once credentials are set, activate the 'When chat message received' n8n trigger and interact with the deployed webhook URL to begin conversing with the Ozki agent.

Node Details

When chat message received (n8n trigger): This specialized LangChain chat n8n trigger acts as the interactive entry point for the workflow, initiating the n8n process whenever a user sends a message to the agent.
Agent (LangChain Agent n8n node): This is the control center of the n8n workflow. It uses complex logic to check dependencies (like memory and tools), guide the user conversation, and delegate data analysis tasks to the connected models and tools. The system prompt is heavily customized to ensure structured outputs.
OpenAI Model (LangChain Chat OpenAI n8n node): Provides the necessary intelligence for the Agent to process the Google Sheets data and generate analytical summaries and KPIs. Requires a correctly configured OpenAI n8n credential.
Simple Memory (LangChain Memory Buffer Window n8n node): This vital n8n node allows the Agent to maintain conversation context, ensuring that subsequent messages within the same n8n workflow run are understood in light of previous interactions.


  • Google Sheets (Google Sheets Tool n8n node): Configured as a tool accessible by the AI Agent. This n8n node allows the Agent to fetch raw data from a specified Google Sheet URL, enabling the powerful data analysis feature of this n8n template.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by
ozkary
ozkary

Featured*