AI-Powered Sentiment and Tagging for Google Sheets Feedback - n8n Workflow

Use this efficient n8n workflow to automatically categorize and analyze customer feedback stored in Google Sheets using OpenAI. Perform sentiment and emotion analysis using optimized batch processing methods.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Product Managers or UX Researchers needing automated categorization of user comments.

  • Customer Support teams looking to quickly triage and analyze feedback volume.

  • Data Analysts seeking structured sentiment and emotion metadata without manual review.

  • Users looking for high-efficiency, cost-optimized n8n templates utilizing batch API calls.

Overview

Managing high volumes of customer feedback stored in Google Sheets can be time-consuming, requiring manual tagging and emotional analysis. This sophisticated n8n workflow solves this by seamlessly integrating Google Sheets with the power of OpenAI.

This n8n workflow is designed for maximum efficiency, utilizing batch processing to send multiple feedback items (default 10) in a single OpenAI request. This significantly reduces API overhead and cost while ensuring comprehensive analysis. The workflow fetches a predefined list of allowed tags from a separate sheet, strongly preferring these for consistency, while using AI-generated tags only as a fallback when no match is found. The result is structured data including sentiment (Very Negative to Very Positive), primary emotion (e.g., anger, gratitude), and up to three relevant tags written directly back to the original sheet, minimizing manual data management.

How it Works

This efficient n8n workflow can be initiated either by the manual n8n trigger for testing or automatically via the Schedule Trigger, which runs every 60 minutes.


  1. Data Acquisition: The process simultaneously uses the Google Sheets n8n node to fetch two key data streams: the list of 'Allowed Tags' from the Tags sheet, and 'New Feedbacks' (rows where the Status column is empty) from the Feedbacks sheet.

  2. Preparation and Merging: The 'Merge Tags & Feedbacks' n8n node combines the two streams. The 'Attach Tags Array' n8n node then appends the full list of allowed tags to every item of new feedback.

  3. Batch Processing: The 'Process Feedbacks in Batches' n8n node splits the feedback list into groups (default batch size is 10). Within each batch, the 'Aggregate Batch Items' Code n8n node bundles these 10 items into a single JSON object alongside the allowed tags.

  4. AI Analysis: The aggregated data is sent to the 'Tag Feedbacks with AI' OpenAI n8n node. A highly detailed system prompt instructs the AI to prioritize the allowed tags for categorization, analyze sentiment, detect primary and secondary emotions, and generate fallback AI tags only if necessary.

  5. Result Splitting: The 'Split Batch Results' Code n8n node parses the single JSON response from OpenAI and splits it back into individual n8n items, now enriched with tags, sentiment, and emotion data, ready for updating the spreadsheet.

  6. Sheet Update: Finally, the 'Update Google Sheet (Tagged)' n8n node uses the unique row_number to write the analyzed results (Tags 1-3, AI Tags 1-2, Sentiment, Emotions, and Status) back to the corresponding rows in the Feedbacks sheet. The workflow then loops back to process the next batch until all new feedback is handled by this powerful n8n template.

Installation Guide

To deploy this automated n8n workflow, follow these setup steps:


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

  2. Google Sheet Setup: Duplicate the required Google Sheet template (provided in the workflow's sticky note) to ensure you have the 'Tags' sheet and the 'Feedbacks' sheet with the necessary column headers (Feedbacks, Status, Tag 1, etc.).

  3. Credentials: Set up or link your credentials for two services:

Google Sheets OAuth2 API: Configure this credential for reading and writing data to your Google Sheet.
OpenAI API: Configure this credential with your API key for accessing the AI analysis engine.

  1. Update Node Parameters: In the 'Fetch Allowed Tags', 'Fetch New Feedbacks', and 'Update Google Sheet (Tagged)' n8n nodes, replace the placeholder GOOGLESHEETSURL with the actual URL of your duplicated Google Sheet.

  2. Execution: Use the 'When clicking 'Execute workflow'' n8n trigger to test a manual run, or enable the 'Schedule Trigger' n8n node to automate runs every 60 minutes.

Node Details

Schedule Trigger / Manual Trigger n8n Trigger: Starts the n8n workflow either on a timer (every 60 minutes) or upon manual command.
Fetch Allowed Tags (Google Sheets n8n node): Reads all entries from the 'Tags' sheet, compiling a master list of approved tags for the AI to prioritize.
Fetch New Feedbacks (Google Sheets n8n node): Reads rows from the 'Feedbacks' sheet where the Status column is empty, identifying new data that needs analysis.
Merge Tags & Feedbacks (Merge n8n node): Combines the two input streams, ensuring feedback items retain the allowed tag list through subsequent nodes.
Process Feedbacks in Batches (Split in Batches n8n node): Controls flow by processing data in chunks (default 10 items) to manage API requests and optimize the n8n workflow's execution speed.
Aggregate Batch Items (Code n8n node): Consolidates the individual items in the current batch into a single, compact JSON payload, preparing it for the bulk call to the AI.
Tag Feedbacks with AI (OpenAI n8n node): The core analysis node, using the gpt-4o-mini model and a complex system prompt to assign tags (prioritizing allowed ones), determine sentiment, and detect primary/secondary emotions.
Split Batch Results (Code n8n node): Parses the single AI output JSON array and splits it back into distinct n8n items, ready for the final write operation.


  • Update Google Sheet (Tagged) (Google Sheets n8n node): Matches analyzed data to the original spreadsheet rows using the row_number and writes the results (Tags, Sentiment, Emotions, Status) back, completing the n8n workflow.

Related n8n Workflows

Free

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

Product Manager & Leadership Coach

Featured*