Templates / Perplexity-style iterative research with Gemini and Google Search

Perplexity-style iterative research with Gemini and Google Search

Ready for 3.0

by [email protected] · 1,628 views · created 2025-06-07 · Market Research, AI RAG

Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.

What this workflow does

This AI workflow has 31 nodes and runs when a chat message arrives. Along the way it connects Google Gemini Chat Model and Redis. It also calls generativelanguage.googleapis.com over HTTP.

How it runs

Trigger: When a chat message arrives.

  1. Configs (Edit Fields (Set)): sets 4 fields: number_of_initial_queries, max_research_loops, current_date…
  2. generate_query (Basic LLM Chain): sends a prompt to an LLM, with model: Google Gemini Chat Model; output parser: Structured Output Parser
  3. set search_query (Edit Fields (Set)): sets or maps fields
  4. Split Out: splits a list into separate items
  5. search_query (Edit Fields (Set)): sets or maps fields
  6. number_of_ran_queries (Redis): incr
  7. attach index as id (Code): runs custom JavaScript code
  8. GeminiSearch (HTTP Request): calls generativelanguage.googleapis.com (POST)
  9. web_search (Code): runs custom JavaScript code
  10. merge web_search_result (Aggregate): combines items into one

…plus 17 more steps. See the full node list below.

Services it uses

Google Gemini Chat ModelRedis

HTTP calls to: generativelanguage.googleapis.com

Before you upgrade to n8n 3.0

Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.

Nodes used (12)

From the author

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…

View the original on n8n.io → Check your own copy

Get the weekly “what broke” email

New templates, newly broken ones, and n8n release changes. One short email a week.

Form not loading? Subscribe here.