Chat with a research assistant using Google Gemini, Wikipedia, and Sheets

Go to Workflow
0 views
Built by Oka Hironobu Oka Hironobu
Created on July 27, 2026

Description

Quick Overview
This workflow provides a chat-based research assistant powered by Google Gemini that can look up facts on Wikipedia, do calculations, and remember context, while also tagging each user question and logging it to a Google Sheets spreadsheet.

How it works
Receives a user message through the built-in n8n chat webhook trigger.
Sends the message to a Google Gemini agent that can consult Wikipedia for factual lookups and use a Calculator tool for arithmetic.
Uses a buffer memory window to keep recent conversation context so follow-up questions stay coherent.
Streams the agent’s plain-language, cited response back to the chat.
In parallel, uses Google Gemini to generate a short 1–3 word topic label for the question.
Appends the original question and its topic label to a Google Sheets tab for tracking what users ask.

Setup
Add Google Gemini (PaLM) API credentials for the agent model and the topic-tagging model.
Add a Google Sheets OAuth2 connection and select the target spreadsheet and the “Questions” sheet in the logging step.
Open the chat URL for the workflow’s public chat trigger and share it with users who should be able to ask questions.

Nodes Used (7)

AI Agent
@n8n/n8n-nodes-langchain.agent
Basic LLM Chain
@n8n/n8n-nodes-langchain.chainLlm
Calculator
@n8n/n8n-nodes-langchain.toolCalculator
Google Gemini Chat Model
@n8n/n8n-nodes-langchain.lmChatGoogleGemini
Google Sheets
n8n-nodes-base.googleSheets
Simple Memory
@n8n/n8n-nodes-langchain.memoryBufferWindow
Wikipedia
@n8n/n8n-nodes-langchain.toolWikipedia