Skip to main content

Find, scrape & analyze Twitter posts by name with Bright Data & Gemini

Workflow preview

Workflow preview
100%
Find, scrape & analyze Twitter posts by name with Bright Data & Gemini preview
Open on n8n.io

Important notice

This workflow is provided as-is. Please review and test before using in production.

1. Workflow Overview

This n8n workflow template automates the process of collecting and analyzing Twitter (X) posts for any public profile, then generates a clean, AI powered summary including key metrics, interests, a...

Best for

  • Market Research automation workflows
  • AI Summarization automation workflows
  • advanced n8n builders looking for reusable templates

Tools used

n8n-nodes-base.html, n8n-nodes-base.formtrigger, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.lmchatgooglegemini, @n8n/n8n-nodes-langchain.outputparserstructured, n8n-nodes-base.form, n8n-nodes-base.if, n8n-nodes-base.googlesheets

Source and attribution

This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Gleb D.

Original n8n.io source

1.1 Workflow description

Title
Find, scrape & analyze Twitter posts by name with Bright Data & Gemini
Workflow name
Find, scrape & analyze Twitter posts by name with Bright Data & Gemini

This n8n workflow template automates the process of collecting and analyzing Twitter (X) posts for any public profile, then generates a clean, AI-powered summary including key metrics, interests, and activity trends.

🚀 What It Does

  • Accepts a user's full name and date range through a public form.
  • Automatically finds the person’s X (formerly Twitter) profile using a Google search.
  • Uses Bright Data to retrieve full post data from the X.com profile.
  • Extracts key post metrics like views, likes, reposts, hashtags, and mentions.
  • Uses Google Gemini (PaLM) to generate a personalized summary: tone, themes, popularity, and sentiments.
  • Stores both raw data and the AI summary into a connected Google Sheet for further review or team collaboration.

🛠️ Step-by-Step Setup

  1. Deploy the public form to collect full name and date range.
  2. Build a Google search query using the name to find their X profile.
  3. Scrape the search results via Bright Data (Web Unlocker zone).
  4. Parse the page content using the HTML node.
  5. Use Gemini AI to extract the correct X profile URL.
  6. Pull full post data via Bright Data dataset snapshot API.
  7. Transform post data into clean structured fields: date_posted, description, hashtags, likes, views, quoted_post.date_posted, quoted_post.description, replies, reposts, quotes, and tagged_users.profile_name.
  8. Analyze all posts using Google Gemini for interest detection and persona generation.
  9. Save results to a Google Sheet: structured post data + AI-written summary.
  10. Show success or fallback messages depending on profile detection or scraping status.

🧠 How It Works: Workflow Overview

  • Trigger: When user submits form
  • Search & Match: Google search → HTML parse → Gemini filters matching X profile
  • Data Gathering: Bright Data → Poll for snapshot completion → Fetch post data
  • Transformation: Extract and restructure key fields via Code node
  • AI Summary: Use Gemini to analyze tone, interests, and trends
  • Export: Save results to Google Sheet
  • Fallback: Display custom error message if no X profile found

📨 Final Output

  • A record in your Google Sheet with:
    • Clean post-level data
    • Profile-level engagement summary
    • An AI-written overview including tone, common topics, and post popularity

🔐 Credentials Used

  • Bright Data account (for search & post scraping)
  • Google Gemini (PaLM) or Gemini Flash via - OpenAI/Google Vertex API
  • Google Sheets (OAuth2) account (for result storage)

⚠️Community Node Dependency This workflow uses a custom community node: n8n-nodes-brightdata Install it via UI (Settings → Community Nodes → Install).

1.2 Logical Blocks

This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.

2. Block-by-Block Analysis

Block 1 - Extract Body and Title from Website

Type / Role
n8n-nodes-base.html - html
Config choices
Version 1.2

Block 2 - When User Completes Form

Type / Role
n8n-nodes-base.formTrigger - formTrigger
Config choices
Version 2.2

Block 3 - Edit Url Google Search

Type / Role
n8n-nodes-base.set - set
Config choices
Version 3.4

Block 4 - Google Gemini Chat Model

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 5 - Structured Output Parser

Type / Role
@n8n/n8n-nodes-langchain.outputParserStructured - outputParserStructured
Config choices
Version 1.2

Block 6 - Form Not Found

Type / Role
n8n-nodes-base.form - form
Config choices
Version 1

Block 7 - X Profile is Found?

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 8 - Check for errors

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 9 - Google Gemini Chat Model1

Type / Role
@n8n/n8n-nodes-langchain.lmChatGoogleGemini - lmChatGoogleGemini
Config choices
Version 1

Block 10 - Form Error

Type / Role
n8n-nodes-base.form - form
Config choices
Version 1

Block 11 - Google Sheets - Adding Posts and Summary

Type / Role
n8n-nodes-base.googleSheets - googleSheets
Config choices
Version 4.3

Block 12 - Analyze Posts

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 13 - Parse X Url

Type / Role
@n8n/n8n-nodes-langchain.chainLlm - chainLlm
Config choices
Version 1.6

Block 14 - Snapshot Content

Type / Role
n8n-nodes-brightdata.brightData - brightData
Config choices
Version 1

Block 15 - Code

Type / Role
n8n-nodes-base.code - code
Config choices
Version 2

Block 16 - Wait 30s - Polling Bright Data

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

Block 17 - If - Checking status of Snapshot - if data is ready or not

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 18 - Snapshot Request

Type / Role
n8n-nodes-brightdata.brightData - brightData
Config choices
Version 1

Block 19 - Snapshot Progress

Type / Role
n8n-nodes-brightdata.brightData - brightData
Config choices
Version 1

Block 20 - BrightData

Type / Role
n8n-nodes-brightdata.brightData - brightData
Config choices
Version 1

Block 21 - Check for errors1

Type / Role
n8n-nodes-base.if - if
Config choices
Version 2.2

Block 22 - Wait 30s - Check if the snapshot is ready

Type / Role
n8n-nodes-base.wait - wait
Config choices
Version 1.1

3. Summary Table

Workflow Find, scrape & analyze Twitter posts by name with Bright Data & Gemini
Complexity advanced
Nodes 22
Categories Market Research, AI Summarization
Author Gleb D
Published 22 May 2025

4. Reproducing the Workflow from Scratch

  1. 1. Download the workflow JSON

    Use the JSON export at /data/workflows/4325/4325.json as the source template for this automation.

  2. 2. Import the template into n8n

    Open n8n, import the downloaded JSON, and review each node before activating the workflow.

  3. 3. Configure credentials and variables

    Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.

  4. 4. Test with sample data

    Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.

  5. 5. Activate and monitor

    Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.

5. General Notes & Resources

Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.

Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.

Frequently asked questions

What does Find, scrape & analyze Twitter posts by name with Bright Data & Gemini do?

This n8n workflow template automates the process of collecting and analyzing Twitter (X) posts for any public profile, then generates a clean, AI powered summary including key metrics, interests, a...

What do I need before importing this workflow?

Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.

Can I customize this workflow?

Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Market Research, AI Summarization use case.