Create a powerful n8n workflow using Google Gemini (LangChain Agents) to automate chat replies, read Google Docs, and log all conversations directly into Google Sheets. Leverage this robust n8n template for conversational AI.
Download this n8n workflow template and start using it instantly.
This n8n workflow template provides a foundation for building custom, highly functional AI chatbots that go beyond simple Q&A. It solves the critical challenge of integrating advanced conversational AI (using Google Gemini via the LangChain framework) directly into messaging platforms while ensuring perfect persistence and auditing by logging all interactions to Google Sheets. Using a powerful n8n node combination, including the crucial AI Agent n8n node, this n8n template allows the bot to not only answer standard questions but also utilize external resources. The agent can automatically access tools like the Docs n8n node to read Google Docs content or perform live web lookups via the Request n8n node, dramatically increasing the agent’s utility and real-time knowledge base. This complete end-to-end n8n workflow demonstrates best practices for building scalable AI agents.
The process is initiated by the Chat message n8n trigger, which is a public webhook that starts the entire n8n workflow upon receiving a message from a connected chat system (like Telegram or Slack). This user input is passed immediately to the central AI Agent n8n node.
AI Agent n8n node uses the powerful Gemini Chat node as its Language Model. The agent analyzes the user's request and decides whether to invoke any specialized tools connected to it.Docs n8n node to fetch and simplify the content of a Google Doc. General web searches or API interactions can be handled by the Request n8n node.AI Agent n8n node is executed in two parallel paths. First, the response is delivered back to the user immediately via the Store in Your Chat (Telegram) n8n node. Second, the response is processed by the Crypto n8n node (likely for data manipulation or simple data structure preparation) and then logged into the Store in sheet n8n node, appending the AI reply message and related data to a specified Google Sheet. This comprehensive n8n workflow ensures every user interaction is contextually handled and permanently recorded.Gemini Chat and Gemini tool nodes.Docs n8n node to allow the agent to read documents.Store in sheet n8n node and specify the target Spreadsheet ID and Sheet Name where conversations will be logged.Store in Your Chat n8n node and set the correct Chat ID for message delivery.Chat message n8n trigger will generate a public webhook URL. Share this URL with your desired chat platform to start listening for messages.This advanced n8n workflow relies on several specialized nodes:
Chat message (n8n trigger):
Function: The primary n8n trigger, initiating the automation when a new chat message is received on the public webhook endpoint.
Key Configuration: Set up as a public webhook to receive incoming chat messages.
AI Agent (n8n node):
Function: The core orchestration engine. This LangChain n8n node processes user input, leverages the configured tools, and formulates the final AI response.
Key Configuration: Links the Language Model (Gemini Chat) and all available tools (Docs, Request, Gemini).
Gemini Chat (n8n node):
Function: Serves as the large language model (LLM) backend for the AI Agent, providing contextual reasoning and text generation capabilities using the Google Gemini model.
Key Configuration: Requires Google Gemini API credentials.
Docs (Google Docs Tool n8n node):
Function: An optional tool available to the AI agent. When called, it retrieves the content of a specified Google Docs document, enabling the agent to incorporate external document knowledge.
Key Configuration: Uses OAuth2 credentials for Google Docs; input document URL/ID is dynamically supplied by the AI Agent logic.
Store in Your Chat (Telegram n8n node):
Function: Handles the final delivery of the AI-generated reply back to the user via Telegram.
Key Configuration: Requires Telegram API credentials and a valid Chat ID.
Store in sheet (Google Sheets n8n node):
Function: Ensures data persistence by appending the user input and the AI-generated response to a Google Sheet, creating a comprehensive log of the n8n workflow activity.
Key Configuration: Operation set to append; maps replay message and processed data to sheet columns.
Automate daily video content creation using this advanced n8n workflow. It reads prompts from Google Sheets, generates videos via MagicHour, uses Gemini AI for SEO metadata, and uploads directly to YouTube.

Generate a highly customized YouTube RSS feed using n8n. This advanced n8n workflow features Redis caching, filtering for shorts and old videos, and embeds the YouTube video player directly into the RSS content. Use this n8n template to streamline your content consumption.

Build a complete short-form video production pipeline using n8n, OpenAI, ElevenLabs, and Creatomate. Generate scripts, voices, visuals, and upload to YouTube automatically.

This n8n workflow automates the creation of Zendesk support tickets from new Gmail messages and Slack posts, logging all details to Google Sheets and sending status alerts via Slack.

I build intelligent systems that automate tasks, streamline workflows, and enhance user experiences using tools like n8n, AI chatbots, and modern automation platforms. With a passion for solving real-world problems through smart technology, I create custom solutions that help individuals and businesses save time, scale faster, and work smarter. Whether it's integrating APIs, building no-code/low-code automations, or developing conversational AI, I'm always exploring the edge of what's possible.







































