LinkedIn Data Extraction and AI Transformation using Bright Data & Gemini - n8n Workflow

Use this robust n8n workflow to scrape LinkedIn profile and company data via Bright Data, then use the Google Gemini n8n node to summarize and structure the results for comprehensive reporting.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Market Researchers & Sales Teams: Needing structured, up-to-date B2B data from LinkedIn.

  • Data Engineers: Seeking robust, scalable web scraping n8n templates.

  • Automation Specialists: Interested in combining third-party scraping services (like Bright Data) with large language models (LLMs) within a single n8n workflow.

  • n8n Users: Looking for advanced examples of using the Bright Data MCP Client n8n node and the Google Gemini n8n node.

Overview

Extracting large volumes of reliable data from platforms like LinkedIn requires specialized tools to handle rate limits and complex structures. This advanced n8n workflow addresses this by integrating Bright Data's Managed Collector Product (MCP) server for stable scraping.

The n8n workflow is split into two main operational branches: scraping a LinkedIn Person Profile and scraping a LinkedIn Company Profile.

For the Company Profile, the collected raw data is not just saved; it is sent to the Google Gemini n8n node, acting as an Information Extractor. This allows the workflow to instantly transform complex, unstructured JSON data into a clean, narrative company story or blog post, demonstrating the power of combining reliable scraping with generative AI within an n8n automation framework. This is one of the most powerful n8n templates for data intelligence.

How it Works

This comprehensive n8n workflow begins with the Manual n8n Trigger. The flow immediately splits to prepare inputs for two distinct scraping operations:


  1. LinkedIn Person Scraping:

The first path uses a 'Set' n8n node to define the target person URL and a webhook endpoint.
The Bright Data MCP Client For LinkedIn Person n8n node executes the scraper tool, retrieving the profile data.
The raw results are posted to a monitoring webhook and subsequently processed by a Function n8n node to create binary data, which is then written to a local file (d:\LinkedIn-Person.json).


  1. LinkedIn Company Scraping (with AI Transformation):

The second path uses a 'Set' n8n node to define the target company URL.
The Bright Data MCP Client For LinkedIn Company n8n node executes the company scraper.
The raw output is cleaned using a Code n8n node to properly parse the JSON content.
The parsed data is routed to the LinkedIn Data Extractor (an n8n node powered by Google Gemini).
The Gemini model analyzes the company data and generates a structured, narrative company story based on the prompt.
The original raw data and the AI-generated story are merged using the Merge n8n node, then cleaned up using the Aggregate n8n node.
Finally, the transformed data (containing both raw 'about' information and the new 'company_story') is sent to a webhook and saved locally to a file (d:\LinkedIn-Company.json).

Installation Guide

To utilize this sophisticated n8n workflow, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and import it into your n8n instance via the 'Workflows' section.

  2. Bright Data Credentials: Configure the MCP Client (STDIO) account credential. You will need your Bright Data API key.

  3. Google Gemini Credentials: Configure the Google Gemini (PaLM) Api account credential, which is necessary for the AI processing n8n node.

  4. Update URLs: Open the 'Set the URLs' and 'Set the LinkedIn Company URL' n8n nodes and replace the placeholder LinkedIn URLs with your desired targets.

  5. Update Webhooks: Change the webhook_url in the 'Set' n8n nodes to your preferred logging or monitoring endpoint.

  6. File Paths (Optional): If running on a self-hosted n8n instance, adjust the local file paths in the 'Write the LinkedIn person info to disk' and 'Write the LinkedIn company info to disk' n8n nodes if the default d:\ path is unsuitable for your environment.

  7. Execute the n8n workflow using the 'Test Workflow' button or by setting up an external n8n trigger.

Node Details

This n8n workflow utilizes several key nodes for data handling, scraping, and AI transformation:

Manual Trigger (n8n trigger): The starting point for executing this n8n automation.
Set (n8n node): Used twice to define input parameters, specifically the LinkedIn profile/company URLs and external webhook endpoints.
Bright Data MCP Client (n8n node): The core scraping component. It is configured to use specialized tools (webdatalinkedinpersonprofile and webdatalinkedincompanyprofile) to reliably retrieve data from LinkedIn.
Code (n8n node): Essential for parsing the raw JSON output from the Bright Data node before it is passed to the AI component.
Google Gemini Chat Model (n8n node): Configured as the Language Model provider (models/gemini-2.0-flash-exp). It supplies the generative power for the extraction process.
LinkedIn Data Extractor (n8n node): Utilizes the Gemini model to follow a precise prompt: "Write a complete story..." This ensures the raw data is restructured into a readable format.
Aggregate (n8n node): Combines the disparate data fields, ensuring the final output item contains both the original data fields (like about) and the new AI-generated company_story field, resulting in a perfectly formatted item for the final webhook and file save.
Read/Write File (n8n node): Used to persist the scraped and processed data locally, providing a backup and historical record of the execution of the n8n workflow.

Related n8n Workflows

Free

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

Featured*