π Analyze customer survey feedback with AI, Google Sheets & Slack reports
β‘ 141 views Β· π Market Research & Insights
Description
Hereβs a clean, English-only template description you can paste into the n8n βDescriptionβ field.
Overview
This workflow analyzes customer survey responses, groups them by sentiment (positive / neutral / negative), generates themes and insights with an AI agent, and delivers a consolidated report to your destinations (Google Sheets, Slack). It runs on a daily schedule and uses batch-based AI analysis for accuracy.
Flow: Schedule β Fetch from Sheets β Group & batch (Code) β AI analysis β Aggregate β Save/Notify (Sheets, Slack)
What Youβll Need
- A survey data source (Google Sheets recommended)
- AI model credentials (e.g., OpenAI or OpenRouter)
- Optional destinations: Google Sheets (summary sheet), Slack channel
Setup
-
Data source (Google Sheets)
- In Get Survey Responses, replace
YOUR_SHEET_IDandYOUR_SHEET_NAMEwith your sheet details. - Ensure the sheet includes columns like:
ζΊθΆ³εΊ¦ (Rating),θͺη±θ¨θΏ°γ³γ‘γ³γ (Comment),εηζ₯ζ (Timestamp).
- In Get Survey Responses, replace
-
AI model
- Add credentials to your preferred LLM node (OpenAI/OpenRouter).
- Keep the promptβs JSON-only requirement so the structured parser can consume it reliably.
-
Destinations
- Save to Sheet: set your output
documentId/sheetName. - Slack: set the target
channelIdon the Slack node.
- Save to Sheet: set your output
How It Works
- Daily Schedule Trigger β starts the workflow at your chosen time.
- Get Survey Responses (Sheets) β reads survey data.
- Group & Prepare Data (Code) β classifies by rating (
>=4: positive,=3: neutral,<3: negative) and creates batches (max 50 per batch). - Loop Over Batches β feeds each sentiment batch to the AI separately for cleaner signals.
- Analyze Survey Batch (AI Agent) β returns structured JSON: themes, insights, recommendations.
- Add Metadata (Code) β attaches original sentiment and item counts to each AI result.
- Aggregate Results (Code) β merges all batches; outputs Top Themes, Key Insights, Priority Recommendations, and an Executive Summary.
- Save to Sheet / Slack β appends the summary to a sheet and posts highlights to Slack.
Data Assumptions (Columns)
Your source should include at least:
ζΊθΆ³εΊ¦ (Rating)β integer 1β5θͺη±θ¨θΏ°γ³γ‘γ³γ (Comment)β stringεηζ₯ζ (Timestamp)β ISO string or date
Outputs
-
Consolidated summary containing:
- Top themes (with example quotes)
- Key insights
- Priority recommendations
- Executive summary
-
Destinations: Google Sheets (one row per run) and Slack (high-level highlights)
Customize
- Adjust sentiment thresholds (e.g., require
>=5for positive) or batch size (default 50) in the Code node. - Tailor the AI prompt or the output JSON schema to your domain.
- Add more outputs (CSV export, database insert, additional channels) in parallel after the Aggregate step.
Before You Run (Checklist)
- Add credentials for Sheets / AI / Slack in Credentials
- Update
documentId,sheetName, and SlackchannelId - Confirm your column names match the Code node references
- Verify schedule time and timezone (e.g., Asia/Tokyo)
Troubleshooting
- Parser errors on AI output: ensure the model response is JSON-only; reduce temperature or simplify schema if needed.
- Only some batches run: check batch size in Loop and ensure each sentiment bucket actually contains responses.
- No output to Sheets/Slack: verify credentials, IDs, and required fields; confirm permissions.
Security & Template Notes
- Do not include credentials in the template file. Users add their own after import.
- Use Sticky Notes to document Overview, Setup, Processing Logic, and Output choices. This template already includes guideline-friendly notes.
π Nodes Used
Google Sheets, Slack, Schedule Trigger, AI Agent, Structured Output Parser, OpenRouter Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File