Reddit Sentiment Analysis using Gemini and Google Sheets - n8n Workflow

Automate Reddit scraping for WWDC25 discussions, classify content, run Google Gemini sentiment analysis, and save results to Google Sheets using this powerful n8n workflow.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Market researchers needing real-time public opinion monitoring.

  • Social media analysts tracking large-scale event sentiment (e.g., Apple WWDC).

  • Data scientists and engineers looking for complex n8n templates integrating web scraping and LLMs.

  • Users seeking an advanced n8n automation solution for unstructured data analysis.

Overview

The core challenge addressed by this n8n workflow is transforming vast amounts of unstructured social media data into quantifiable, actionable business intelligence. This powerful n8n template starts by initiating targeted web scraping on Reddit for specific topics like 'WWDC25' using Bright Data. Unlike simple scraping solutions, this n8n workflow introduces sophisticated AI processing powered by Google Gemini. It first classifies post relevance using a Text Classifier n8n node, ensuring only pertinent data is analyzed. Subsequently, it performs deep, comment-level sentiment analysis, assigning nuanced emotional categories. This high-value n8n automation ensures efficiency, delivering cleaned, filtered sentiment data directly to a Google Sheet for easy visualization and reporting. This robust architecture makes it an indispensable n8n node integration for modern market research.

How it Works

The process begins with the When clicking ‘Execute workflow’ n8n trigger, initiating the entire n8n workflow. The subsequent scrap reddit n8n node (HTTP Request) triggers the Bright Data scraper for 'WWDC25' posts. To handle the asynchronous scraping process, the n8n workflow uses a status loop: the Get status n8n node checks if the data is ready. If the Switch n8n node determines the status is 'running', the Wait n8n node pauses execution for 15 seconds before checking again. Once 'ready', the Get data n8n node retrieves the full dataset.

The Loop Over Items n8n node processes each Reddit post individually. The Text Classifier n8n node (using Google Gemini) determines if the post belongs to the 'WWDC events' category. Irrelevant posts are routed back through a No category path to skip further processing. Relevant posts proceed to the Edit Fields and Split Out n8n nodes, which prepare the data and split the comments array into individual items.

The core analysis happens at the comment level: the Sentiment Analysis per comment n8n node uses Google Gemini to assign a specific sentiment (Excited, Disappointed, etc.) to each comment, using the original post's title and description for context. After the Merge n8n node combines the data paths, the format sentiment n8n node standardizes the output. Finally, the Filter n8n node discards any ambiguous (Not clear) sentiments before the Append Sentiments Google Sheets n8n node writes the structured results to your designated spreadsheet. This complete n8n workflow provides end-to-end data analysis.

Installation Guide


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

  2. API Keys (Bright Data): Configure the Bright Data API credentials within the scrap reddit and subsequent HTTP Request n8n nodes (Get status, Get data). Replace { your api key} with your actual bearer token.

  3. Google Gemini Setup: Provide credentials for Google Gemini (PaLM) to the Google Gemini Chat Model and Google Gemini Chat Model1 n8n node instances. This requires a valid API key connected to your n8n installation.

  4. Google Sheets Setup: Connect your Google Sheets account to the Append Sentiments n8n node. Select the target spreadsheet ('APPLE #WWDC25 Sentiments ') and the specific sheet ('Reddit Comments'). Ensure the column names in the sheet match the fields being outputted by the final format sentiment n8n node.

Node Details

When clicking ‘Execute workflow’ (Manual Trigger n8n node): Function: Starts the entire n8n automation manually.
scrap reddit (HTTP Request n8n node): Function: Initiates the web scraping job via the Bright Data API. Key Configuration: Uses POST method; targets datasetid: gdlvz8ah06191smkebj4; Body specifies keyword: WWDC25 and numofposts: 100.
Switch (Core Logic Flow Control n8n node): Function: Controls the scraping status loop. Key Configuration: Branches workflow execution based on the API response status (status equals 'ready' or 'running').
Wait (Core Logic Flow Control n8n node): Function: Pauses the n8n workflow for 15 seconds if the scraping job is still 'running', preventing excessive API calls.
Loop Over Items (Split In Batches n8n node): Function: Ensures AI processing happens sequentially per post, avoiding potential API rate limits and maintaining context.
Text Classifier (LangChain n8n node): Function: Uses the Google Gemini models/gemini-2.0-flash to classify posts into 'WWDC events' or 'other', filtering out irrelevant noise early in the n8n workflow.
Split Out (Transformation n8n node): Function: Takes the comments array from a single post item and splits it into multiple individual items, allowing sentiment analysis to run per comment.
Sentiment Analysis per comment (LangChain n8n node): Function: Performs nuanced analysis using the Gemini AI model (models/gemini-2.0-flash-lite). Key Configuration: Specifies custom categories like 'Excited, Disappointed, Impressed, Indifferent, skeptical'.
Filter (Core Logic Flow Control n8n node): Function: Removes items where the sentiment analysis result was 'Not clear', ensuring high-quality data. Key Configuration: Filters where sentimentAnalysis does not contain 'Not clear'.
Append Sentiments (Google Sheets n8n node): Function: The final action of this n8n automation, appending the structured sentiment data into the designated Google Sheet for reporting.

Related n8n Workflows

Free

Nodes: 14 Nodes
Updated: December 26 2025
View all
Created by

Automation expert with years of experience helping businesses improve their efficiency and productivity with smart automations that are affordable, scalable, and flexible.

Featured*