Back to Catalog

Automate call center sentiment analysis with GPT-4o-mini and Google Sheets

InfyOm TechnologiesInfyOm Technologies
680 views
2/3/2026
Official Page

βœ… What problem does this workflow solve?

Call centers often record conversations for quality control and training, but reviewing every transcript manually is tedious and inefficient. This workflow automates sentiment analysis for each call, providing structured feedback across multiple key categories, so managers can focus on improving performance and training.


βš™οΈ What does this workflow do?

  1. Accepts a Google Sheet containing:
    • Call transcript
    • Agent name
    • Customer name
  2. Analyzes each call transcript across multiple sentiment dimensions:
    • πŸ‘‹ Greeting Sentiment
    • πŸ§‘β€πŸ’Ό Agent Friendliness
    • ❓ Problem-Solving Sentiment
    • πŸ™‚ Customer Sentiment
    • πŸ‘‹ Closing Sentiment
    • βœ… Issue Resolved (Yes/No)
  3. Add Conversation Topics discussed in a call
  4. Calculates an overall call rating based on combined analysis.
  5. Updates the Google Sheet with:
    • Individual sentiment scores
    • Issue resolution status
    • Final call rating

πŸ”§ Setup Instructions

πŸ“„ Google Sheets

  • Prepare a sheet with the following columns:
    • Transcript
    • Agent Name
    • Customer Name

The workflow will append results in new columns automatically:

  • Greeting Sentiment
  • Closing Sentiment
  • Agent Friendliness
  • Problem Solving
  • Customer Sentiment
  • Issue Resolved
  • Overall Call Rating (out of 5 or 10)

🧠 OpenAI Setup

  • Connect OpenAI API to perform NLP-based sentiment classification.
  • For each transcript, use structured prompts to analyze individual components.

🧠 How it Works – Step-by-Step

  1. Sheet Scan – The workflow reads rows from the provided Google Sheet.
  2. Loop Through Calls – For each transcript, it:
    • Sends prompts to OpenAI to analyze:
      • Greeting tone (friendly/neutral/rude)
      • Problem-solving quality (clear/confusing/helpful)
      • Closing sentiment
      • Agent attitude
      • Customer satisfaction
      • Whether the issue was resolved
    • Calculates a composite rating from all factors.
  3. Update Sheet – All analyzed data is written back into the Google Sheet.

πŸ“Š Example Output

https://docs.google.com/spreadsheets/d/1aWU28D_73nvkDMPfTkPkaV53kHgX7cg0W4NwLzGFEGU/edit?gid=0#gid=0


πŸ‘€ Who can use this?

This workflow is ideal for:

  • ☎️ Call Centers
  • 🎧 Customer Support Teams
  • 🧠 Training & QA Departments
  • 🏒 BPOs or Support Vendors

If you want deeper insight into every customer interaction, this workflow delivers quantified, actionable sentiment metrics automatically.


πŸ›  Customization Ideas

  • πŸ“… Add scheduled runs (daily/weekly) to auto-analyze new calls.
  • πŸ“ Export flagged or low-rated calls into a review dashboard.
  • 🧩 Integrate with Slack or email to send alerts for low-score calls.
  • πŸ—‚ Filter by agent, category, or score to track performance trends.

πŸš€ Ready to Use?

Just connect:

  • βœ… Google Sheets (with transcript data)
  • βœ… OpenAI API

…and this workflow will automatically turn your raw call transcripts into actionable sentiment insights.

Automate Call Center Sentiment Analysis with GPT-4o Mini and Google Sheets

This n8n workflow automates the process of analyzing call center sentiment using a Google Sheet as input and an AI agent powered by GPT-4o Mini. It periodically checks a Google Sheet for new call records, processes each record to determine sentiment, and then updates the sheet with the analysis results.

What it does

This workflow simplifies and automates sentiment analysis for call center interactions by:

  1. Triggering on a Schedule: The workflow runs at a set interval (e.g., every 5 minutes) to check for new data.
  2. Reading Call Data from Google Sheets: It fetches all rows from a specified Google Sheet, assuming each row represents a call interaction.
  3. Preparing Data for AI Analysis: It transforms the incoming Google Sheet data into a format suitable for the AI agent, specifically extracting the call transcript.
  4. Looping Through Call Records: It processes each call record individually to ensure consistent analysis.
  5. Analyzing Sentiment with GPT-4o Mini: An AI Agent, configured with an OpenAI Chat Model (GPT-4o Mini) and a Structured Output Parser, analyzes the call transcript to determine sentiment (e.g., positive, negative, neutral) and extract key entities or reasons.
  6. Updating Google Sheets: After analysis, the workflow updates the original Google Sheet with the sentiment, extracted entities, and any other relevant AI-generated insights for each call record.

Prerequisites/Requirements

To use this workflow, you will need:

  • n8n Instance: A running n8n instance (cloud or self-hosted).
  • Google Sheets Account: A Google account with access to Google Sheets.
  • OpenAI API Key: An API key for OpenAI to access the GPT-4o Mini model.
    • Note: Ensure your OpenAI API key has access to gpt-4o-mini.
  • Google Sheets Credential in n8n: A Google Sheets OAuth2 credential configured in your n8n instance.
  • OpenAI Credential in n8n: An OpenAI API credential configured in your n8n instance.

Setup/Usage

  1. Import the Workflow:
    • Download the provided JSON file for this workflow.
    • In your n8n instance, go to "Workflows" and click "New".
    • Click the "Import from JSON" button and paste the workflow JSON or upload the file.
  2. Configure Credentials:
    • Locate the "Google Sheets" node. Click on it and select your existing Google Sheets credential or create a new one using OAuth2.
    • Locate the "OpenAI Chat Model" node within the "AI Agent" node. Click on it and select your OpenAI API Key credential or create a new one.
  3. Configure Google Sheet Details:
    • In the "Google Sheets" node, specify the "Spreadsheet ID" and "Sheet Name" where your call center data is stored.
    • Ensure your Google Sheet has a column for call transcripts (e.g., "Transcript") and columns where the sentiment and entities will be written back (e.g., "Sentiment", "Entities").
  4. Configure the AI Agent Prompt:
    • The "AI Agent" node contains the logic for sentiment analysis. Review the prompt within the "OpenAI Chat Model" to ensure it aligns with your desired sentiment analysis output. The "Structured Output Parser" is configured to expect a specific JSON structure from the AI.
  5. Activate the Workflow:
    • Once all credentials and configurations are set, click the "Activate" toggle in the top right corner of the n8n editor to enable the workflow. It will start running according to its schedule.

This workflow is designed to be highly customizable. You can adjust the scheduling, modify the Google Sheet columns, or refine the AI agent's prompt to suit specific sentiment analysis requirements.

Related Templates

Two-way property repair management system with Google Sheets & Drive

This workflow automates the repair request process between tenants and building managers, keeping all updates organized in a single spreadsheet. It is composed of two coordinated workflows, as two separate triggers are required β€” one for new repair submissions and another for repair updates. A Unique Unit ID that corresponds to individual units is attributed to each request, and timestamps are used to coordinate repair updates with specific requests. General use cases include: Property managers who manage multiple buildings or units. Building owners looking to centralize tenant repair communication. Automation builders who want to learn multi-trigger workflow design in n8n. --- βš™οΈ How It Works Workflow 1 – New Repair Requests Behind the Scenes: A tenant fills out a Google Form (β€œRepair Request Form”), which automatically adds a new row to a linked Google Sheet. Steps: Trigger: Google Sheets rowAdded – runs when a new form entry appears. Extract & Format: Collects all relevant form data (address, unit, urgency, contacts). Generate Unit ID: Creates a standardized identifier (e.g., BUILDING-UNIT) for tracking. Email Notification: Sends the building manager a formatted email summarizing the repair details and including a link to a Repair Update Form (which activates Workflow 2). --- Workflow 2 – Repair Updates Behind the Scenes:\ Triggered when the building manager submits a follow-up form (β€œRepair Update Form”). Steps: Lookup by UUID: Uses the Unit ID from Workflow 1 to find the existing row in the Google Sheet. Conditional Logic: If photos are uploaded: Saves each image to a Google Drive folder, renames files consistently, and adds URLs to the sheet. If no photos: Skips the upload step and processes textual updates only. Merge & Update: Combines new data with existing repair info in the same spreadsheet row β€” enabling a full repair history in one place. --- 🧩 Requirements Google Account (for Forms, Sheets, and Drive) Gmail/email node connected for sending notifications n8n credentials configured for Google API access --- ⚑ Setup Instructions (see more detail in workflow) Import both workflows into n8n, then copy one into a second workflow. Change manual trigger in workflow 2 to a n8n Form node. Connect Google credentials to all nodes. Update spreadsheet and folder IDs in the corresponding nodes. Customize email text, sender name, and form links for your organization. Test each workflow with a sample repair request and a repair update submission. --- πŸ› οΈ Customization Ideas Add Slack or Telegram notifications for urgent repairs. Auto-create folders per building or unit for photo uploads. Generate monthly repair summaries using Google Sheets triggers. Add an AI node to create summaries/extract relevant repair data from repair request that include long submissions.

Matt@VeraisonLabsBy Matt@VeraisonLabs
208

Generate song lyrics and music from text prompts using OpenAI and Fal.ai Minimax

Spark your creativity instantly in any chatβ€”turn a simple prompt like "heartbreak ballad" into original, full-length lyrics and a professional AI-generated music track, all without leaving your conversation. πŸ“‹ What This Template Does This chat-triggered workflow harnesses AI to generate detailed, genre-matched song lyrics (at least 600 characters) from user messages, then queues them for music synthesis via Fal.ai's minimax-music model. It polls asynchronously until the track is ready, delivering lyrics and audio URL back in chat. Crafts original, structured lyrics with verses, choruses, and bridges using OpenAI Submits to Fal.ai for melody, instrumentation, and vocals aligned to the style Handles long-running generations with smart looping and status checks Returns complete song package (lyrics + audio link) for seamless sharing πŸ”§ Prerequisites n8n account (self-hosted or cloud with chat integration enabled) OpenAI account with API access for GPT models Fal.ai account for AI music generation πŸ”‘ Required Credentials OpenAI API Setup Go to platform.openai.com β†’ API keys (sidebar) Click "Create new secret key" β†’ Name it (e.g., "n8n Songwriter") Copy the key and add to n8n as "OpenAI API" credential type Test by sending a simple chat completion request Fal.ai HTTP Header Auth Setup Sign up at fal.ai β†’ Dashboard β†’ API Keys Generate a new API key β†’ Copy it In n8n, create "HTTP Header Auth" credential: Name="Fal.ai", Header Name="Authorization", Header Value="Key [Your API Key]" Test with a simple GET to their queue endpoint (e.g., /status) βš™οΈ Configuration Steps Import the workflow JSON into your n8n instance Assign OpenAI API credentials to the "OpenAI Chat Model" node Assign Fal.ai HTTP Header Auth to the "Generate Music Track", "Check Generation Status", and "Fetch Final Result" nodes Activate the workflowβ€”chat trigger will appear in your n8n chat interface Test by messaging: "Create an upbeat pop song about road trips" 🎯 Use Cases Content Creators: YouTubers generating custom jingles for videos on the fly, streamlining production from idea to audio export Educators: Music teachers using chat prompts to create era-specific folk tunes for classroom discussions, fostering interactive learning Gift Personalization: Friends crafting anniversary R&B tracks from shared memories via quick chats, delivering emotional audio surprises Artist Brainstorming: Songwriters prototyping hip-hop beats in real-time during sessions, accelerating collaboration and iteration ⚠️ Troubleshooting Invalid JSON from AI Agent: Ensure the system prompt stresses valid JSON; test the agent standalone with a sample query Music Generation Fails (401/403): Verify Fal.ai API key has minimax-music access; check usage quotas in dashboard Status Polling Loops Indefinitely: Bump wait time to 45-60s for complex tracks; inspect fal.ai queue logs for bottlenecks Lyrics Under 600 Characters: Tweak agent prompt to enforce fuller structures like [V1][C][V2][B][C]; verify output length in executions

Daniel NkenchoBy Daniel Nkencho
601

Automate invoice processing with OCR, GPT-4 & Salesforce opportunity creation

PDF Invoice Extractor (AI) End-to-end pipeline: Watch Drive ➜ Download PDF ➜ OCR text ➜ AI normalize to JSON ➜ Upsert Buyer (Account) ➜ Create Opportunity ➜ Map Products ➜ Create OLI via Composite API ➜ Archive to OneDrive. --- Node by node (what it does & key setup) 1) Google Drive Trigger Purpose: Fire when a new file appears in a specific Google Drive folder. Key settings: Event: fileCreated Folder ID: google drive folder id Polling: everyMinute Creds: googleDriveOAuth2Api Output: Metadata { id, name, ... } for the new file. --- 2) Download File From Google Purpose: Get the file binary for processing and archiving. Key settings: Operation: download File ID: ={{ $json.id }} Creds: googleDriveOAuth2Api Output: Binary (default key: data) and original metadata. --- 3) Extract from File Purpose: Extract text from PDF (OCR as needed) for AI parsing. Key settings: Operation: pdf OCR: enable for scanned PDFs (in options) Output: JSON with OCR text at {{ $json.text }}. --- 4) Message a model (AI JSON Extractor) Purpose: Convert OCR text into strict normalized JSON array (invoice schema). Key settings: Node: @n8n/n8n-nodes-langchain.openAi Model: gpt-4.1 (or gpt-4.1-mini) Message role: system (the strict prompt; references {{ $json.text }}) jsonOutput: true Creds: openAiApi Output (per item): $.message.content β†’ the parsed JSON (ensure it’s an array). --- 5) Create or update an account (Salesforce) Purpose: Upsert Buyer as Account using an external ID. Key settings: Resource: account Operation: upsert External Id Field: taxid_c External Id Value: ={{ $json.message.content.buyer.tax_id }} Name: ={{ $json.message.content.buyer.name }} Creds: salesforceOAuth2Api Output: Account record (captures Id) for downstream Opportunity. --- 6) Create an opportunity (Salesforce) Purpose: Create Opportunity linked to the Buyer (Account). Key settings: Resource: opportunity Name: ={{ $('Message a model').item.json.message.content.invoice.code }} Close Date: ={{ $('Message a model').item.json.message.content.invoice.issue_date }} Stage: Closed Won Amount: ={{ $('Message a model').item.json.message.content.summary.grand_total }} AccountId: ={{ $json.id }} (from Upsert Account output) Creds: salesforceOAuth2Api Output: Opportunity Id for OLI creation. --- 7) Build SOQL (Code / JS) Purpose: Collect unique product codes from AI JSON and build a SOQL query for PricebookEntry by Pricebook2Id. Key settings: pricebook2Id (hardcoded in script): e.g., 01sxxxxxxxxxxxxxxx Source lines: $('Message a model').first().json.message.content.products Output: { soql, codes } --- 8) Query PricebookEntries (Salesforce) Purpose: Fetch PricebookEntry.Id for each Product2.ProductCode. Key settings: Resource: search Query: ={{ $json.soql }} Creds: salesforceOAuth2Api Output: Items with Id, Product2.ProductCode (used for mapping). --- 9) Code in JavaScript (Build OLI payloads) Purpose: Join lines with PBE results and Opportunity Id ➜ build OpportunityLineItem payloads. Inputs: OpportunityId: ={{ $('Create an opportunity').first().json.id }} Lines: ={{ $('Message a model').first().json.message.content.products }} PBE rows: from previous node items Output: { body: { allOrNone:false, records:[{ OpportunityLineItem... }] } } Notes: Converts discount_total ➜ per-unit if needed (currently commented for standard pricing). Throws on missing PBE mapping or empty lines. --- 10) Create Opportunity Line Items (HTTP Request) Purpose: Bulk create OLIs via Salesforce Composite API. Key settings: Method: POST URL: https://<your-instance>.my.salesforce.com/services/data/v65.0/composite/sobjects Auth: salesforceOAuth2Api (predefined credential) Body (JSON): ={{ $json.body }} Output: Composite API results (per-record statuses). --- 11) Update File to One Drive Purpose: Archive the original PDF in OneDrive. Key settings: Operation: upload File Name: ={{ $json.name }} Parent Folder ID: onedrive folder id Binary Data: true (from the Download node) Creds: microsoftOneDriveOAuth2Api Output: Uploaded file metadata. --- Data flow (wiring) Google Drive Trigger β†’ Download File From Google Download File From Google β†’ Extract from File β†’ Update File to One Drive Extract from File β†’ Message a model Message a model β†’ Create or update an account Create or update an account β†’ Create an opportunity Create an opportunity β†’ Build SOQL Build SOQL β†’ Query PricebookEntries Query PricebookEntries β†’ Code in JavaScript Code in JavaScript β†’ Create Opportunity Line Items --- Quick setup checklist πŸ” Credentials: Connect Google Drive, OneDrive, Salesforce, OpenAI. πŸ“‚ IDs: Drive Folder ID (watch) OneDrive Parent Folder ID (archive) Salesforce Pricebook2Id (in the JS SOQL builder) 🧠 AI Prompt: Use the strict system prompt; jsonOutput = true. 🧾 Field mappings: Buyer tax id/name β†’ Account upsert fields Invoice code/date/amount β†’ Opportunity fields Product name must equal your Product2.ProductCode in SF. βœ… Test: Drop a sample PDF β†’ verify: AI returns array JSON only Account/Opportunity created OLI records created PDF archived to OneDrive --- Notes & best practices If PDFs are scans, enable OCR in Extract from File. If AI returns non-JSON, keep β€œReturn only a JSON array” as the last line of the prompt and keep jsonOutput enabled. Consider adding validation on parsing.warnings to gate Salesforce writes. For discounts/taxes in OLI: Standard OLI fields don’t support per-line discount amounts directly; model them in UnitPrice or custom fields. Replace the Composite API URL with your org’s domain or use the Salesforce node’s Bulk Upsert for simplicity.

Le NguyenBy Le Nguyen
942