Back to Catalog

Automated real-time web research with Gemini AI and SerpAPI search

Agent CircleAgent Circle
2613 views
2/3/2026
Official Page

This workflow demonstrates how to automate live information gathering, fact-checking, and trend analysis in response to any chat message - using a powerful AI agent, memory, and a real-time search tool.

Use cases are many: This is perfect for researchers needing instant, up-to-date data; support teams providing live, accurate answers; content creators looking to verify facts or find hot topics; and analysts automating regular reports with the freshest information.

How It Works

  • The workflow is triggered whenever a chat message is received (e.g., a user question, research prompt, or data request).
  • The message is sent to the AI Agent, which follows the following steps:
    • First, it queries SerpAPI – Research to gather the latest real-time information and data from the web.
    • Next, it checks the Window Buffer Memory for any related past interactions or contextual information that may be useful.
    • Finally, it sends all collected data and context to the Google Gemini Chat Model, which analyzes the information and generates a comprehensive, intelligent response.
  • Then, the AI Agent delivers the analyzed, up-to-date answer directly in the chat, combining live data, context, and expert analysis.

How To Set Up

  • Download and import the workflow into your n8n workspace.
  • Set up API credentials and tool access for the AI Agent:
    • Google Gemini (for chat-based intelligence) → connected to Node Google Gemini Chat Model.
    • SerpAPI (for real-time web and search results) → connected to Node SerpAPI - Research.
    • Window Buffer Memory (for richer, context-aware conversations) → connected to Node Window Buffer Memory.
  • Open the chat in n8n and type the topic or trend you want to research.
  • Send the message and wait for the process to complete.
  • Receive the AI-powered research reply in the chat box.

Requirements

  • An n8n instance (self-hosted or cloud).
  • SerpAPI credentials for live web search and data gathering.
  • Window Buffer Memory configured to provide relevant conversation context in history.
  • Google Gemini API access to analyze collected data and generate responses.

How To Customize

  • Choose your preferred AI model: Replace Google Gemini with OpenAI ChatGPT, or any other chat model as preferred.
  • Add or change memory: Replace Window Buffer Memory with more advanced memory options for deeper recall.
  • Connect your preferred chat platform: Easily swap out the default chat integration for Telegram, Slack, or any other compatible messaging platform to trigger and interact with the workflow.

Need Help?

If you’d like this workflow customized, or if you’re looking to build a tailored AI Agent for your own business - please feel free to reach out to Agent Circle. We’re always here to support and help you to bring automation ideas to life.

Join our community on different platforms for assistance, inspiration and tips from others.

Website: https://www.agentcircle.ai/ Etsy: https://www.etsy.com/shop/AgentCircle Gumroad: http://agentcircle.gumroad.com/ Discord Global: https://discord.gg/d8SkCzKwnP FB Page Global: https://www.facebook.com/agentcircle/ FB Group Global: https://www.facebook.com/groups/aiagentcircle/ X: https://x.com/agent_circle YouTube: https://www.youtube.com/@agentcircle LinkedIn: https://www.linkedin.com/company/agentcircle

6274-automated-real-time-web-research-with-gemini-ai-and-serpapi-search

This n8n workflow automates real-time web research using advanced AI capabilities from Google Gemini and web search results from SerpAPI. It's designed to act as an AI agent that can understand a query, perform web searches, and synthesize information to provide comprehensive answers.

What it does

This workflow sets up an AI agent that can perform web research tasks. Here's a breakdown of the steps:

  1. Triggers on Chat Message: The workflow starts when a new chat message is received, acting as the prompt or research query for the AI agent.
  2. Initializes AI Agent: An AI Agent is configured to process the incoming chat message.
  3. Configures Language Model: The agent uses the Google Gemini Chat Model as its primary language model for understanding queries and generating responses.
  4. Sets up Memory: A Simple Memory component is included to allow the AI agent to maintain context and remember previous interactions within the same conversation, enabling more coherent and relevant follow-up responses.
  5. Integrates Web Search Tool: The agent is equipped with the SerpApi (Google Search) tool, allowing it to perform real-time web searches to gather information relevant to the user's query.
  6. Processes and Responds: Based on the chat message, the AI agent will use its language model and the SerpApi tool to perform research, synthesize information, and formulate an answer, which it then returns as a chat response.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running instance of n8n.
  • Google Gemini API Key: An API key for the Google Gemini Chat Model. This needs to be configured as a credential in n8n.
  • SerpApi API Key: An API key for SerpApi to enable Google Search functionality. This also needs to be configured as a credential in n8n.

Setup/Usage

  1. Import the workflow: Download the provided JSON and import it into your n8n instance.
  2. Configure Credentials:
    • Locate the "Google Gemini Chat Model" node and configure your Google Gemini API key credential.
    • Locate the "SerpApi (Google Search)" node and configure your SerpApi API key credential.
  3. Activate the Workflow: Ensure the workflow is activated.
  4. Send a Chat Message: Use the "Manual Chat Trigger" (by clicking "Execute Workflow" and providing a message) to send a research query to the AI agent. The agent will then process your request, perform web searches, and provide a synthesized response.

Related Templates

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chat—turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. 📋 What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing 🔧 Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation 🔑 Required Credentials OpenAI API Setup Go to platform.openai.com → API keys (sidebar) Click "Create new secret key" → Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai → Dashboard → API Keys Generate a new API key → Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) ⚙️ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflow—chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Automate Dutch Public Procurement Data Collection with TenderNed

TenderNed Public Procurement What This Workflow Does This workflow automates the collection of public procurement data from TenderNed (the official Dutch tender platform). It: Fetches the latest tender publications from the TenderNed API Retrieves detailed information in both XML and JSON formats for each tender Parses and extracts key information like organization names, titles, descriptions, and reference numbers Filters results based on your custom criteria Stores the data in a database for easy querying and analysis Setup Instructions This template comes with sticky notes providing step-by-step instructions in Dutch and various query options you can customize. Prerequisites TenderNed API Access - Register at TenderNed for API credentials Configuration Steps Set up TenderNed credentials: Add HTTP Basic Auth credentials with your TenderNed API username and password Apply these credentials to the three HTTP Request nodes: "Tenderned Publicaties" "Haal XML Details" "Haal JSON Details" Customize filters: Modify the "Filter op ..." node to match your specific requirements Examples: specific organizations, contract values, regions, etc. How It Works Step 1: Trigger The workflow can be triggered either manually for testing or automatically on a daily schedule. Step 2: Fetch Publications Makes an API call to TenderNed to retrieve a list of recent publications (up to 100 per request). Step 3: Process & Split Extracts the tender array from the response and splits it into individual items for processing. Step 4: Fetch Details For each tender, the workflow makes two parallel API calls: XML endpoint - Retrieves the complete tender documentation in XML format JSON endpoint - Fetches metadata including reference numbers and keywords Step 5: Parse & Merge Parses the XML data and merges it with the JSON metadata and batch information into a single data structure. Step 6: Extract Fields Maps the raw API data to clean, structured fields including: Publication ID and date Organization name Tender title and description Reference numbers (kenmerk, TED number) Step 7: Filter Applies your custom filter criteria to focus on relevant tenders only. Step 8: Store Inserts the processed data into your database for storage and future analysis. Customization Tips Modify API Parameters In the "Tenderned Publicaties" node, you can adjust: offset: Starting position for pagination size: Number of results per request (max 100) Add query parameters for date ranges, status filters, etc. Add More Fields Extend the "Splits Alle Velden" node to extract additional fields from the XML/JSON data, such as: Contract value estimates Deadline dates CPV codes (procurement classification) Contact information Integrate Notifications Add a Slack, Email, or Discord node after the filter to get notified about new matching tenders. Incremental Updates Modify the workflow to only fetch new tenders by: Storing the last execution timestamp Adding date filters to the API query Only processing publications newer than the last run Troubleshooting No data returned? Verify your TenderNed API credentials are correct Check that you have setup youre filter proper Need help setting this up or interested in a complete tender analysis solution? Get in touch 🔗 LinkedIn – Wessel Bulte

Wessel BulteBy Wessel Bulte
247

AI-powered code review with linting, red-marked corrections in Google Sheets & Slack

Advanced Code Review Automation (AI + Lint + Slack) Who’s it for For software engineers, QA teams, and tech leads who want to automate intelligent code reviews with both AI-driven suggestions and rule-based linting — all managed in Google Sheets with instant Slack summaries. How it works This workflow performs a two-layer review system: Lint Check: Runs a lightweight static analysis to find common issues (e.g., use of var, console.log, unbalanced braces). AI Review: Sends valid code to Gemini AI, which provides human-like review feedback with severity classification (Critical, Major, Minor) and visual highlights (red/orange tags). Formatter: Combines lint and AI results, calculating an overall score (0–10). Aggregator: Summarizes results for quick comparison. Google Sheets Writer: Appends results to your review log. Slack Notification: Posts a concise summary (e.g., number of issues and average score) to your team’s channel. How to set up Connect Google Sheets and Slack credentials in n8n. Replace placeholders (<YOURSPREADSHEETID>, <YOURSHEETGIDORNAME>, <YOURSLACKCHANNEL_ID>). Adjust the AI review prompt or lint rules as needed. Activate the workflow — reviews will start automatically whenever new code is added to the sheet. Requirements Google Sheets and Slack integrations enabled A configured AI node (Gemini, OpenAI, or compatible) Proper permissions to write to your target Google Sheet How to customize Add more linting rules (naming conventions, spacing, forbidden APIs) Extend the AI prompt for project-specific guidelines Customize the Slack message formatting Export analytics to a dashboard (e.g., Notion or Data Studio) Why it’s valuable This workflow brings realistic, team-oriented AI-assisted code review to n8n — combining the speed of automated linting with the nuance of human-style feedback. It saves time, improves code quality, and keeps your team’s review history transparent and centralized.

higashiyama By higashiyama
90