This workflow corresponds to n8n.io template #3642 — we link there as the canonical source.
This workflow follows the Agent → Gmail 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": "DTdojLaqC01QCcXz",
"meta": {
"templateCredsSetupCompleted": true
},
"name": "Social listenning",
"tags": [],
"nodes": [
{
"id": "09244606-227e-42ee-8eee-b39fd9ec1353",
"name": "When clicking \u2018Test workflow\u2019",
"type": "n8n-nodes-base.manualTrigger",
"position": [
-840,
1660
],
"parameters": {},
"typeVersion": 1
},
{
"id": "d4f30c2d-60c5-4b25-a6ba-945c59fe29a8",
"name": "Google Sheets",
"type": "n8n-nodes-base.googleSheets",
"position": [
-640,
1660
],
"parameters": {},
"typeVersion": 4.5
},
{
"id": "48e81d30-2892-43a3-876c-e46011739a30",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
660,
1480
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "23fbd89a-1d14-413d-8798-2f1915651fc3",
"name": "Prepare Prompts1",
"type": "n8n-nodes-base.function",
"position": [
520,
1260
],
"parameters": {},
"typeVersion": 1
},
{
"id": "c55ccffc-d620-4162-a944-508775ba8a21",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
840,
1460
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "1e136fc1-055e-42c3-b77e-51dcb2bf60e6",
"name": "analysis topics proposal",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-40,
1240
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "60bd98f4-4824-40a7-936b-466bf60b921f",
"name": "OpenAI Chat Model1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-20,
1440
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "4de9964d-d2c9-42a6-bbb6-9b7da096dbc9",
"name": "Structured Output Parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
160,
1440
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "55abf7b6-8c29-4f4e-bd9c-cd7813529dd9",
"name": "Merge original table and the prompts",
"type": "n8n-nodes-base.merge",
"position": [
360,
1260
],
"parameters": {},
"typeVersion": 3.1
},
{
"id": "7ed2c444-82f9-4ca3-a7c8-446f0e9ac1e6",
"name": "OpenAI Chat Model2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1300,
1500
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "baa054dd-40cd-4176-9c5b-5c3e3efbee36",
"name": "Unified AI Agent for analysis",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
660,
1260
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "d835b7ea-c636-49ff-b503-757986aee1ca",
"name": "Transform results into columns",
"type": "n8n-nodes-base.code",
"position": [
1000,
1260
],
"parameters": {},
"typeVersion": 2
},
{
"id": "b57d48a5-44a7-4b0f-984b-69d648614d35",
"name": "All unique elements merge",
"type": "n8n-nodes-base.code",
"position": [
1160,
1260
],
"parameters": {},
"typeVersion": 2
},
{
"id": "71e3cd1f-b1c8-4dd5-b7ad-96a638db61ea",
"name": "Structured Output Parser2",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
1480,
1480
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "871c5348-be6b-4eb7-9cca-4311b7bed571",
"name": "proposal refinement agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1320,
1260
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "0b5e0e03-6faf-42ce-ac2b-464e76f50924",
"name": "OpenAI Chat Model3",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1860,
1840
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "7b89e91c-f849-4786-89bd-86f07d9d8ad3",
"name": "Second iteration of analysis",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1860,
1640
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "a1a57ceb-2bf4-4fed-9e74-fd548db98491",
"name": "Structured Output Parser3",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2020,
1800
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "3ab8569d-d3cd-46a4-afe7-e2b359416b50",
"name": "Merge",
"type": "n8n-nodes-base.merge",
"position": [
1680,
1640
],
"parameters": {},
"typeVersion": 3.1
},
{
"id": "921e60f6-72bf-4f32-9721-3f4636353ae3",
"name": "Summarization of the unalysed results",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2340,
1640
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "8acb5abd-733f-492c-897c-9ef9eeaf1775",
"name": "OpenAI Chat Model4",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2340,
1900
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "51c84d52-f235-434a-a484-7a82d385be53",
"name": "Structured Output Parser4",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2500,
1840
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "ae251045-850a-4a60-a587-7162fcc78ecc",
"name": "OpenAI Chat Model5",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2660,
1880
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "c94f55ec-721c-489b-89e4-0d02ef73b25e",
"name": "Final report editor",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2660,
1640
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "86c00be2-5ecf-4627-8a78-67ef1a3eef16",
"name": "Structured Output Parser5",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2820,
1800
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "c916fd36-4601-486b-9da3-d441e90be074",
"name": "Revisor and HTML formating agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2980,
1640
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "03c2bf53-05eb-492a-924c-db708df11b11",
"name": "OpenAI Chat Model6",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2980,
1900
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "1534a011-ff33-4bbb-a9bc-3ffe0c9443fd",
"name": "Get the first n rows",
"type": "n8n-nodes-base.filter",
"position": [
-480,
1240
],
"parameters": {},
"typeVersion": 2.2
},
{
"id": "69c50f29-183a-40f3-99e0-4911cb600e57",
"name": "wrap up the whole results into one Json file",
"type": "n8n-nodes-base.code",
"position": [
2180,
1640
],
"parameters": {},
"typeVersion": 2
},
{
"id": "7c04c879-bb9f-49ff-85d4-4e9b459fe065",
"name": "Merging first sample rows",
"type": "n8n-nodes-base.code",
"position": [
-280,
1240
],
"parameters": {},
"typeVersion": 2
},
{
"id": "5677b81b-0ebe-4e8f-85d5-0c403a672763",
"name": "Completion agents (optional)",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
3340,
1640
],
"parameters": {},
"typeVersion": 1.8
},
{
"id": "1d02eb7f-7c33-4278-8ce9-b225bff4dd99",
"name": "OpenAI Chat Model7",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
3340,
1900
],
"parameters": {},
"typeVersion": 1.2
},
{
"id": "cb4d0d10-5301-488c-861f-98bd873ea1a8",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
3720,
1640
],
"parameters": {},
"typeVersion": 3.4
},
{
"id": "50d0ba8f-6635-414d-946b-1d785992b5fb",
"name": "Gmail",
"type": "n8n-nodes-base.gmail",
"position": [
3940,
1640
],
"parameters": {},
"typeVersion": 2.1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "ac5647ac-6c15-4451-a8ff-4e2d1aed32b2",
"connections": {
"Merge": {
"main": [
[
{
"node": "Second iteration of analysis",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Gmail",
"type": "main",
"index": 0
}
]
]
},
"Google Sheets": {
"main": [
[
{
"node": "Get the first n rows",
"type": "main",
"index": 0
},
{
"node": "Merge original table and the prompts",
"type": "main",
"index": 1
},
{
"node": "Merge",
"type": "main",
"index": 1
}
]
]
},
"Prepare Prompts1": {
"main": [
[
{
"node": "Unified AI Agent for analysis",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Unified AI Agent for analysis",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "analysis topics proposal",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "proposal refinement agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model3": {
"ai_languageModel": [
[
{
"node": "Second iteration of analysis",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model4": {
"ai_languageModel": [
[
{
"node": "Summarization of the unalysed results",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model5": {
"ai_languageModel": [
[
{
"node": "Final report editor",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model6": {
"ai_languageModel": [
[
{
"node": "Revisor and HTML formating agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model7": {
"ai_languageModel": [
[
{
"node": "Completion agents (optional)",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Final report editor": {
"main": [
[
{
"node": "Revisor and HTML formating agent",
"type": "main",
"index": 0
}
]
]
},
"Get the first n rows": {
"main": [
[
{
"node": "Merging first sample rows",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "Unified AI Agent for analysis",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"analysis topics proposal": {
"main": [
[
{
"node": "Merge original table and the prompts",
"type": "main",
"index": 0
}
]
]
},
"All unique elements merge": {
"main": [
[
{
"node": "proposal refinement agent",
"type": "main",
"index": 0
}
]
]
},
"Merging first sample rows": {
"main": [
[
{
"node": "analysis topics proposal",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser1": {
"ai_outputParser": [
[
{
"node": "analysis topics proposal",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser2": {
"ai_outputParser": [
[
{
"node": "proposal refinement agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser3": {
"ai_outputParser": [
[
{
"node": "Second iteration of analysis",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser4": {
"ai_outputParser": [
[
{
"node": "Summarization of the unalysed results",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Structured Output Parser5": {
"ai_outputParser": [
[
{
"node": "Final report editor",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"proposal refinement agent": {
"main": [
[
{
"node": "Merge",
"type": "main",
"index": 0
}
]
]
},
"Completion agents (optional)": {
"main": [
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Second iteration of analysis": {
"main": [
[
{
"node": "wrap up the whole results into one Json file",
"type": "main",
"index": 0
}
]
]
},
"Unified AI Agent for analysis": {
"main": [
[
{
"node": "Transform results into columns",
"type": "main",
"index": 0
}
]
]
},
"Transform results into columns": {
"main": [
[
{
"node": "All unique elements merge",
"type": "main",
"index": 0
}
]
]
},
"Revisor and HTML formating agent": {
"main": [
[
{
"node": "Completion agents (optional)",
"type": "main",
"index": 0
}
]
]
},
"When clicking \u2018Test workflow\u2019": {
"main": [
[
{
"node": "Google Sheets",
"type": "main",
"index": 0
}
]
]
},
"Merge original table and the prompts": {
"main": [
[
{
"node": "Prepare Prompts1",
"type": "main",
"index": 0
}
]
]
},
"Summarization of the unalysed results": {
"main": [
[
{
"node": "Final report editor",
"type": "main",
"index": 0
}
]
]
},
"wrap up the whole results into one Json file": {
"main": [
[
{
"node": "Summarization of the unalysed results",
"type": "main",
"index": 0
}
]
]
}
}
}
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This workflow automates the analysis of customer feedback or social media data from Google Sheets using DeepSeek LLM, transforming raw text into structured semantic insights. The workflow also generates data visualizations and produces a final HTML report, ready for email…
Source: https://n8n.io/workflows/3642/ — 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.
Automated Book Generation System. Uses googleSheetsTrigger, gmail, lmChatOpenAi, outputParserStructured. Event-driven trigger; 43 nodes.
This n8n workflow template automates your lead generation and follow-up process using AI. It captures leads through a form, enriches them with company data, classifies them into different categories,
Want to skip the manual work and instantly generate SWOT analyses for your business plans, investor decks, or strategy docs? 🚀 This workflow lets you automate the entire SWOT (Strengths, Weaknesses, O
The workflow runs every hour with a randomized delay of 5–20 minutes to help distribute load. It records the exact date and time a lead is emailed so you can track outreach. Follow-ups are automatical
Enterprise-grade resume screening automation built for production environments. This workflow combines intelligent AI analysis with comprehensive error handling to ensure reliable processing of candid