This workflow corresponds to n8n.io template #8278 — we link there as the canonical source.
This workflow follows the Agent → Google Sheets recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "D3gKQ4UE1XR2TC8n",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "AI lead qualification",
"tags": [],
"nodes": [
{
"id": "4c1057b9-9d53-47b3-a319-b726d87759b4",
"name": "Google Sheets Trigger",
"type": "n8n-nodes-base.googleSheetsTrigger",
"position": [
-544,
-128
],
"parameters": {
"options": {},
"pollTimes": {
"item": [
{
"mode": "everyMinute"
}
]
},
"sheetName": {
"__rl": true,
"mode": "list",
"value": 931869588,
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1cOFWYxogbcRih5akkyApvBsV7vXPTFWUjAGtJe-fwEI/edit#gid=931869588",
"cachedResultName": "Form Responses 1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1cOFWYxogbcRih5akkyApvBsV7vXPTFWUjAGtJe-fwEI",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1cOFWYxogbcRih5akkyApvBsV7vXPTFWUjAGtJe-fwEI/edit?usp=drivesdk",
"cachedResultName": "Product Review form (Responses)"
}
},
"credentials": {
"googleSheetsTriggerOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "5abf8a0d-a5d9-46d6-8e3d-097158a50d9b",
"name": "Code - Parse AI JSON",
"type": "n8n-nodes-base.code",
"position": [
32,
-128
],
"parameters": {
"jsCode": "// Loop over all input items\nfor (const item of $input.all()) {\n // Add a new field\n item.json.myNewField = 1;\n\n // Parse the stringified JSON in 'output'\n const parsed = JSON.parse(item.json.output);\n const sheet = $('Google Sheets Trigger').first().json;\n\n // Extract and assign values\n item.json.Timestamp = sheet.Timestamp;\n item.json.Name = sheet.Name;\n item.json.Email = sheet.Email;\n item.json['Contact Number'] = sheet['Contact Number'];\n item.json['Review of the product'] = sheet['Review of the product'];\n item.json.intent = parsed.intent;\n item.json.sentiment = parsed.sentiment;\n item.json.score = parsed.score;\n item.json.summary = parsed.summary;\n\n\n delete item.json.output;\n delete item.json.myNewField;\n}\n\n// Return updated items\nreturn $input.all();\n"
},
"typeVersion": 2
},
{
"id": "908c833d-4230-45b6-a7ae-d3f3d4d4ac51",
"name": "Google Sheets - Update Lead",
"type": "n8n-nodes-base.googleSheets",
"position": [
256,
-128
],
"parameters": {
"columns": {
"value": {
"Name": "={{ $json.Name }}",
"Email": "={{ $json.Email }}",
"Score": "={{ $json.score }}",
"Intent": "={{ $json.intent }}",
"Summary": "={{ $json.summary }}",
"Sentiment": "={{ $json.sentiment }}",
"Timestamp": "={{ $json.Timestamp }}",
"row_number": 0,
"Contact Number": "={{ $json[\"Contact Number\"] }}",
"Review of the product": "={{ $json[\"Review of the product\"] }}"
},
"schema": [
{
"id": "Timestamp",
"type": "string",
"display": true,
"required": false,
"displayName": "Timestamp",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Name",
"type": "string",
"display": true,
"required": false,
"displayName": "Name",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Email",
"type": "string",
"display": true,
"required": false,
"displayName": "Email",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Contact Number",
"type": "string",
"display": true,
"required": false,
"displayName": "Contact Number",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Review of the product",
"type": "string",
"display": true,
"required": false,
"displayName": "Review of the product",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Intent",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Intent",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Sentiment",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Sentiment",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Score",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Score",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "Summary",
"type": "string",
"display": true,
"removed": false,
"required": false,
"displayName": "Summary",
"defaultMatch": false,
"canBeUsedToMatch": true
},
{
"id": "row_number",
"type": "number",
"display": true,
"removed": false,
"readOnly": true,
"required": false,
"displayName": "row_number",
"defaultMatch": false,
"canBeUsedToMatch": true
}
],
"mappingMode": "defineBelow",
"matchingColumns": [
"row_number"
],
"attemptToConvertTypes": false,
"convertFieldsToString": false
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qohS8H6x3_CrXiT0t1jpxjDk_YbEbHrkAa2tDHWJCc4/edit#gid=0",
"cachedResultName": "Sheet1"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "1qohS8H6x3_CrXiT0t1jpxjDk_YbEbHrkAa2tDHWJCc4",
"cachedResultUrl": "https://docs.google.com/spreadsheets/d/1qohS8H6x3_CrXiT0t1jpxjDk_YbEbHrkAa2tDHWJCc4/edit?usp=drivesdk",
"cachedResultName": "Updated product review"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4
},
{
"id": "8d30516b-719c-4d62-a419-571423e98969",
"name": "AI Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-336,
-128
],
"parameters": {
"text": "=Here is the customer review data: {{ $json[\"Review of the product\"] }}",
"options": {
"systemMessage": "=You are an AI assistant that analyzes customer product reviews.\nYour job is to:\n\nUnderstand the customer\u2019s intent (e.g., praise, complaint, suggestion, feature request, mixed feedback).\n\nEvaluate the sentiment (positive, neutral, negative, or mixed).\n\nAssign a score from 1\u201310 (1 = very negative, 10 = excellent).\n\nReturn results in clean JSON format with these keys:\n\nintent\n\nsentiment\n\nscore\n\nsummary (short 1\u20132 sentence summary of the review).\n\nDo not add extra commentary outside the JSON."
},
"promptType": "define"
},
"typeVersion": 2.1
},
{
"id": "789b8347-91ce-4152-9eaf-7a7550016897",
"name": "Azure OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatAzureOpenAi",
"position": [
-352,
32
],
"parameters": {
"model": "gpt-4o-mini",
"options": {}
},
"credentials": {
"azureOpenAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "ab65ad1f-f875-437b-bb05-4decf1d27c8b",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-688,
-496
],
"parameters": {
"width": 288,
"height": 336,
"content": "## Node 1: Google Sheets Trigger\n**Type**: Trigger Node\n**Purpose**: Data Source Monitor\n**Description**: This node continuously monitors a spreadsheet for new customer review submissions. It polls the data source at regular intervals (every minute) and automatically triggers the workflow whenever new form responses are detected. The node is configured to watch a specific sheet containing customer feedback data including timestamps, names, contact information, and product reviews."
},
"typeVersion": 1
},
{
"id": "a7c641fd-b529-4038-b5ed-2c18d2eea2be",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-336,
-544
],
"parameters": {
"width": 272,
"height": 384,
"content": "## Node 2: AI Agent\n **Type**: AI Processing Node\n**Purpose**: Review Analysis Engine\n**Description**: This node processes customer review text using an AI language model. It analyzes the review content to determine customer intent (such as praise, complaint, suggestion, or feature request), evaluates sentiment (positive, negative, neutral, or mixed), assigns a numerical score from 1-10, and generates a concise summary. The node is configured with specific system prompts to ensure consistent JSON-formatted output containing intent, sentiment, score, and summary fields."
},
"typeVersion": 1
},
{
"id": "d132ceb8-058a-434f-b872-5aab1275ee2d",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-592,
144
],
"parameters": {
"height": 384,
"content": "## Node 3: Azure OpenAI Chat Model\n**Type**: AI Model Connection\n**Purpose**: Language Model Provider\n**Description**: This node provides the AI language model capability to the AI Agent node. It connects to an external AI service using the GPT-4o-mini model and handles the actual natural language processing tasks. The node manages the API connection and model configuration required for the review analysis functionality."
},
"typeVersion": 1
},
{
"id": "9ae50a46-7c45-47b0-85cc-d11731138f66",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-48,
32
],
"parameters": {
"height": 432,
"content": "## Node 4: Code - Parse AI JSON\n**Type**: Data Processing Node\n**Purpose**: Data Parser and Formatter\n**Description**: This node processes the AI analysis results and combines them with the original customer data. It extracts the JSON response from the AI agent, parses the intent, sentiment, score, and summary fields, and merges this information with the original customer details (timestamp, name, email, contact number, and review text). The node also cleans up temporary fields and prepares the data for final storage."
},
"typeVersion": 1
},
{
"id": "91c624b3-9f27-4d26-8918-fe7e27e092e1",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
112,
-560
],
"parameters": {
"width": 256,
"height": 416,
"content": "## Node 5: Google Sheets - Update Lead\n**Type**: Data Storage Node\n**Purpose**: Enhanced Data Writer\n**Description**: This node saves the processed results to a destination spreadsheet. It takes the combined customer information and AI analysis results and appends them to a target sheet. The node is configured to write specific columns including all original customer data plus the new AI-generated insights (intent, sentiment, score, summary), creating a comprehensive customer feedback database."
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "79ed4ff6-5908-4fff-9cb7-a4ed0f023328",
"connections": {
"AI Agent": {
"main": [
[
{
"node": "Code - Parse AI JSON",
"type": "main",
"index": 0
}
]
]
},
"Code - Parse AI JSON": {
"main": [
[
{
"node": "Google Sheets - Update Lead",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets Trigger": {
"main": [
[
{
"node": "AI Agent",
"type": "main",
"index": 0
}
]
]
},
"Azure OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
azureOpenAiApigoogleSheetsOAuth2ApigoogleSheetsTriggerOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Description:
Source: https://n8n.io/workflows/8278/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow is designed for marketers, content creators, agencies, and solo founders who want to publish long‑form posts with visuals on autopilot using n8n and AI agents.
Description:
Automatically score candidate questionnaire responses using Azure OpenAI (GPT-4o-mini), combine them with existing evaluations from Google Sheets, and keep your candidate database up to date—all in ne
Automatically qualify and route new leads from a Google Sheet into your CRM with AI-powered scoring and instant sales notifications. Turn raw form submissions into prioritized opportunities—effortless
This automation is designed to help you generate AI-powered music tracks, cover art, and fully rendered music videos — all triggered from a simple Telegram chat and managed via Google Sheets.