Search & Summarize Web Data using Bright Data, Perplexity, and Gemini - n8n Workflow

Automate deep web searches and content summarization using this powerful n8n workflow. Integrate Bright Data, Perplexity, and Gemini AI for efficient, asynchronous data processing and reporting.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Data analysts and researchers who require reliable, large-scale web data extraction.

  • n8n users looking to implement sophisticated asynchronous job handling and polling logic.

  • Businesses needing to automatically summarize complex search results or market intelligence data.

  • Developers building custom n8n templates that integrate multiple AI and scraping services.

Overview

This advanced n8n workflow leverages external APIs to perform complex, targeted web searches (via Perplexity/Bright Data) and utilizes state-of-the-art AI for rapid data interpretation. The design specifically addresses the challenges of asynchronous web scraping jobs, where a delay is required between the initial request and the final data download. By using a polling mechanism built using the 'If' and 'Wait' n8n nodes, this n8n workflow ensures that data processing only begins after the scrape job successfully completes.

Furthermore, the integration of Google Gemini (via the LangChain n8n node) allows for cleaning raw HTML data and generating concise, high-quality summaries. Using this n8n template saves significant manual effort by automating the extraction and summarization of large content chunks, providing a complete, actionable data pipeline within a single n8n execution.

How it Works

This comprehensive n8n workflow executes a complex data pipeline involving external API calls, status checking, data fetching, AI-powered extraction, and final summarization.


  1. Initiation (n8n Trigger): The n8n workflow starts via the 'When clicking ‘Test workflow’ n8n trigger (easily replaceable with a production webhook or schedule n8n trigger).

  2. Search Request: The 'Perplexity Search Request' n8n node sends a query to the Bright Data API, initiating the web scraping job using Perplexity. It retrieves a job reference ID.

  3. ID Capture & Polling Setup: The 'Set Snapshot Id' n8n node extracts the unique snapshot_id from the response.

  4. Status Check Loop: The 'Check Snapshot Status' n8n node polls the Bright Data API using the snapshot ID. The 'If' n8n node checks if the job status is 'ready'. If not, the 'Wait' n8n node pauses the execution for 30 seconds before re-checking, effectively managing the asynchronous operation.

  5. Error Handling & Download: Once ready, the 'Check on the errors' n8n node verifies the absence of scraping errors. If the data is clean, the 'Download Snapshot' n8n node fetches the complete, raw JSON data.

  6. Data Extraction (Gemini AI): The raw HTML content is passed to the 'Readable Data Extractor' n8n node, which uses the Google Gemini Chat Model (Flash Exp) to clean and structure the data into a readable format.

  7. Content Summarization (Gemini AI): The cleaned content is then passed to the 'Summarization of search result' n8n node. This LangChain n8n node uses a document loader, a text splitter (Recursive Character Text Splitter), and the Google Gemini Chat Model (Experimental) to generate a concise summary of the entire search result.

  8. Notification: Finally, the 'Webhook Notifier' n8n node posts the final, summarized output to a target webhook URL.

Installation Guide

To deploy this powerful n8n workflow and start using these advanced n8n templates, follow these steps:


  1. Import: Copy the provided JSON code and paste it into your n8n instance using the 'New' -> 'Import from JSON' option.

  2. Credentials: You must configure credentials for the services used:

HTTP Header Auth: Used for Bright Data (Perplexity Search and Snapshot checks/downloads). This usually requires an Authorization token.
Google Gemini (PaLM) API: Required for the two Gemini Chat Model n8n nodes used for extraction and summarization.

  1. Configuration: Update the 'Perplexity Search Request' n8n node with your desired search query.

  2. Webhook Setup: Crucially, update the URL in the 'Webhook Notifier' n8n node (currently set to a placeholder https://webhook.site/...) to your desired notification endpoint. This ensures the output of the n8n workflow reaches you.

Node Details

Manual Trigger (n8n trigger): Initiates the n8n workflow execution, typically used for testing this n8n template.
Perplexity Search Request (HTTP Request n8n node): Sends a POST request to the Bright Data API to start a Perplexity search job. Key configuration includes the datasetid and the JSON body containing the target prompt (e.g., 'tell me about BrightData').
Wait (n8n node): Implements a 30-second delay in the loop when the Bright Data job is not yet complete, crucial for managing the asynchronous nature of the scraping job.
If (n8n node): Core flow control. Checks if the status returned by Bright Data is 'ready' before proceeding to data download.
Download Snapshot (HTTP Request n8n node): Fetches the completed search results using the dynamically set snapshotid.
Readable Data Extractor (Langchain Information Extractor n8n node): Uses the Google Gemini Chat Model1 to analyze the raw HTML content ($json.answer_html) and extract clean, readable text, improving the quality of the input for summarization.
Google Gemini Chat Model (Langchain n8n node): Provides the language model backbone for the subsequent summarization chain. Configured to use an experimental model (models/gemini-2.0-flash-thinking-exp-01-21).
Summarization of search result (Langchain Summarization Chain n8n node): Processes the cleaned text, often handling large documents by utilizing connected document loaders and splitters, to generate a final summary.


  • Webhook Notifier (HTTP Request n8n node): The final action n8n node, sending the summarized output to an external endpoint for reporting or further automation.

Related n8n Workflows

Free

Nodes: 11 Nodes
Updated: December 26 2025
View all
Created by
Ranjan Dailata
Ranjan Dailata

Featured*