📊 Perplexity-style iterative research with Gemini and Google Search

1,449 views · 📊 Market Research & Insights

Description

AI Comprehensive Research on User’s Query with Gemini and Web Search

What is this?

Perform comprehensive research on a user’s query by dynamically generating search terms, querying the web using Google Search (by Gemini) , reflecting on the results to identify knowledge gaps, and iteratively refining its search until it can provide a well-supported answer with citations. (like Perplexity)

This workflow is a reproduction of gemini-fullstack-langgraph-quickstart in N8N.

The gemini‑fullstack‑langgraph‑quickstart is a demo by the Google‑Gemini team that showcases how to build a powerful full‑stack AI agent using Gemini and LangGraph

How It Works

Generate Query 💬

Web Research 🌐

Reflection 📚

Setup

  1. Configure API Credentials:

    • Create Google Gemini(PaLM) Api Credential using you own Gemini key
    • Connect the credential with three nodes: Google Gemini Chat Model and GeminiSearch and reflection
  2. Configure Redis Source:

    • prepare a Redis service that can be accessed by n8n
    • Create Redis Crediential and connect it with all Redis node

Customize

Why use Redis?

Use Redis as an external storage to maintain global variables (counter, search results, etc.)

This workflow contains a loop process, which need global variables (as State in LangGraph).

It is difficult to achieve global variables management without external storage in n8n.

🔗 Nodes Used

HTTP Request, Redis, Basic LLM Chain, Structured Output Parser, Chat Trigger, Google Gemini Chat Model

📥 Import

Download workflow.json and import into n8n: Workflow menu → Import from File

📖 Importing guide · 🔑 Credential setup