This workflow corresponds to n8n.io template #11708 — 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": "Ugje593PFRZH2tez",
"name": "AI-Powered Strategy Optimization and Autonomous Cross-Functional Task Automation",
"tags": [],
"nodes": [
{
"id": "5fcfbd33-d86e-4982-92d2-559d0b7a3cbb",
"name": "Monthly Schedule",
"type": "n8n-nodes-base.scheduleTrigger",
"position": [
1552,
2096
],
"parameters": {
"rule": {
"interval": [
{
"field": "months",
"triggerAtHour": 9
}
]
},
"notice": "Triggers the workflow monthly on the 1st at 9:00 AM to initiate cross-functional data collection and analysis"
},
"typeVersion": 1.3
},
{
"id": "e42687e8-7267-4f5b-bf8b-79daf27ac382",
"name": "Workflow Configuration",
"type": "n8n-nodes-base.set",
"position": [
1776,
2096
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "salesApiUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Sales API endpoint URL__>"
},
{
"id": "id-2",
"name": "marketingApiUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Marketing API endpoint URL__>"
},
{
"id": "id-3",
"name": "financeApiUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Finance API endpoint URL__>"
},
{
"id": "id-4",
"name": "supportApiUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Support API endpoint URL__>"
},
{
"id": "id-5",
"name": "reportRecipients",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Email addresses for strategy report (comma-separated)__>"
},
{
"id": "id-6",
"name": "note",
"type": "string",
"value": "Centralizes all workflow configuration including API endpoints for each department and email recipients for reports"
},
{
"id": "id-7",
"name": "slackAlertChannel",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Slack channel ID for alerts__>"
},
{
"id": "id-8",
"name": "historicalTrendsUrl",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Historical trends API endpoint__>"
},
{
"id": "id-9",
"name": "dashboardSheetId",
"type": "string",
"value": "<__PLACEHOLDER_VALUE__Google Sheets document ID__>"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "da68f57a-282f-4a87-bd93-6ae7433c5970",
"name": "Fetch Sales Data",
"type": "n8n-nodes-base.httpRequest",
"position": [
2000,
1664
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.salesApiUrl }}",
"options": {},
"authentication": "predefinedCredentialType"
},
"typeVersion": 4.3
},
{
"id": "f8278139-f071-43db-a0f6-4b9095f03226",
"name": "Fetch Marketing Data",
"type": "n8n-nodes-base.httpRequest",
"position": [
2000,
1808
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.marketingApiUrl }}",
"options": {},
"authentication": "predefinedCredentialType"
},
"typeVersion": 4.3
},
{
"id": "69aed389-362b-43f2-a4ac-d8e04d29a4a4",
"name": "Fetch Finance Data",
"type": "n8n-nodes-base.httpRequest",
"position": [
2000,
1968
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.financeApiUrl }}",
"options": {},
"authentication": "predefinedCredentialType"
},
"typeVersion": 4.3
},
{
"id": "67aecba5-c61b-4423-a398-d2b28fd60d26",
"name": "Fetch Support Data",
"type": "n8n-nodes-base.httpRequest",
"position": [
2000,
2112
],
"parameters": {
"url": "={{ $('Workflow Configuration').first().json.supportApiUrl }}",
"options": {},
"authentication": "predefinedCredentialType"
},
"typeVersion": 4.3
},
{
"id": "b9a86336-21e8-4622-b5a5-c591c63889f7",
"name": "Merge All Data",
"type": "n8n-nodes-base.aggregate",
"position": [
2224,
2000
],
"parameters": {
"options": {},
"aggregate": "aggregateAllItemData"
},
"typeVersion": 1
},
{
"id": "e2992bd8-abb0-40fa-ac62-21b5ad4772a1",
"name": "Build Unified Data Model",
"type": "n8n-nodes-base.set",
"position": [
2896,
1904
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "unifiedData",
"type": "string",
"value": "={{ JSON.stringify($input.all()) }}"
},
{
"id": "id-2",
"name": "analysisDate",
"type": "string",
"value": "={{ $now.format('yyyy-MM-dd') }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "40bb53f7-18bd-437d-9992-be4fc2dfb212",
"name": "AI Strategy Analyzer",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
3536,
1840
],
"parameters": {
"text": "=Analyze the following cross-functional business data: {{ $json.unifiedData }}",
"options": {
"systemMessage": "You are a strategic business analyst AI specializing in cross-functional data analysis.\n\nYour task is to:\n1. Analyze data from sales, marketing, finance, and support departments\n2. Identify weak spots, inefficiencies, and opportunities across all functions\n3. Detect patterns, correlations, and anomalies in the data\n4. Generate actionable strategic recommendations in three categories:\n - Growth opportunities (revenue expansion, market penetration, customer acquisition)\n - Cost-reduction initiatives (operational efficiency, resource optimization)\n - Product improvements (feature enhancements, quality improvements, customer satisfaction)\n\nFor each recommendation:\n- Provide a clear title and detailed description\n- Specify the category (growth, cost-reduction, or product-improvement)\n- Indicate priority level (high, medium, low)\n- Estimate potential impact\n- Suggest specific action steps\n\nReturn your analysis as a structured JSON object with an array of recommendations."
},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 3
},
{
"id": "cce22eae-b13c-4c64-a21b-55009b371dc4",
"name": "OpenAI Chat Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
3536,
2096
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"notice": "OpenAI GPT-4 model powers the strategic analysis and recommendation generation",
"options": {},
"builtInTools": {}
},
"credentials": {
"openAiApi": {
"name": "<your credential>"
}
},
"typeVersion": 1.3
},
{
"id": "e9353013-2a40-43dd-bb32-2560a693f44f",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
3680,
2096
],
"parameters": {
"notice": "Ensures AI output is returned in structured JSON format with recommendations array containing title, description, category, priority, impact, and action steps",
"schemaType": "manual",
"inputSchema": "{\n \"type\": \"object\",\n \"properties\": {\n \"recommendations\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"title\": {\n \"type\": \"string\"\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"category\": {\n \"type\": \"string\"\n },\n \"priority\": {\n \"type\": \"string\"\n },\n \"impact\": {\n \"type\": \"string\"\n },\n \"actionSteps\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n }\n }\n }\n }\n }\n}"
},
"typeVersion": 1.3
},
{
"id": "46e26f77-9a79-4c4d-bee2-eb1272464cc8",
"name": "Split Recommendations",
"type": "n8n-nodes-base.code",
"position": [
4144,
1760
],
"parameters": {
"jsCode": "// Get the AI analysis output from the previous node\nconst aiOutput = $input.first().json;\n\n// Extract recommendations array\nconst recommendations = aiOutput.recommendations || [];\n\n// Prepare email report data (single item)\nconst emailReport = {\n summary: aiOutput.summary || '',\n keyInsights: aiOutput.keyInsights || [],\n recommendations: recommendations,\n generatedDate: new Date().toISOString()\n};\n\n// Create output items: one for email report, followed by individual recommendations\nconst outputItems = [];\n\n// First item: email report data\noutputItems.push({\n json: {\n type: 'email_report',\n ...emailReport\n }\n});\n\n// Subsequent items: individual recommendations for task creation\nrecommendations.forEach((recommendation, index) => {\n outputItems.push({\n json: {\n type: 'task',\n taskNumber: index + 1,\n ...recommendation\n }\n });\n});\n\nreturn outputItems;",
"notice": "Splits the recommendations array into individual items - first item for email report, subsequent items for individual task creation in Asana"
},
"typeVersion": 2
},
{
"id": "7dded0b7-205c-4e62-ac6a-01a4f5c04aa0",
"name": "Send Strategy Report",
"type": "n8n-nodes-base.gmail",
"position": [
4592,
1936
],
"parameters": {
"sendTo": "={{ $('Workflow Configuration').first().json.reportRecipients }}",
"message": "=<h1>Monthly Strategy Report - {{ $now.format('MMMM yyyy') }}</h1>\n\n<h2>Executive Summary</h2>\n<p>This report contains AI-generated strategic recommendations based on cross-functional data analysis from Sales, Marketing, Finance, and Support departments.</p>\n\n<h2>Strategic Recommendations</h2>\n\n{{ $json.recommendations.map(rec => `\n<div style=\"margin-bottom: 30px; padding: 20px; border-left: 4px solid ${rec.priority === 'High' ? '#ff6b6b' : rec.priority === 'Medium' ? '#ffa500' : '#4ecdc4'}; background-color: #f8f9fa;\">\n <h3 style=\"margin-top: 0; color: #2c3e50;\">${rec.category}: ${rec.title}</h3>\n <p><strong>Priority:</strong> <span style=\"color: ${rec.priority === 'High' ? '#ff6b6b' : rec.priority === 'Medium' ? '#ffa500' : '#4ecdc4'}; font-weight: bold;\">${rec.priority}</span></p>\n <p><strong>Description:</strong> ${rec.description}</p>\n <h4>Action Steps:</h4>\n <ol>\n ${rec.actionSteps.map(step => `<li>${step}</li>`).join('')}\n </ol>\n <p><strong>Expected Impact:</strong> ${rec.expectedImpact}</p>\n <p><strong>Timeline:</strong> ${rec.timeline}</p>\n</div>\n`).join('') }}\n\n<hr style=\"margin: 30px 0;\">\n<p style=\"color: #7f8c8d; font-size: 12px;\">This report was automatically generated by the AI-Driven Cross-Functional Strategy Optimization system.</p>",
"options": {},
"subject": "=Monthly Strategy Report - {{ $now.format('MMMM yyyy') }}"
},
"credentials": {
"gmailOAuth2": {
"name": "<your credential>"
}
},
"typeVersion": 2.2
},
{
"id": "a3fb00ec-ae34-43b8-9857-0a8d938932fe",
"name": "Create Tasks in Asana",
"type": "n8n-nodes-base.asana",
"position": [
4592,
2096
],
"parameters": {
"name": "={{ $json.title }}",
"workspace": "<__PLACEHOLDER_VALUE__Asana workspace ID__>",
"otherProperties": {
"notes": "={{ $json.description + '\\n\\nCategory: ' + $json.category + '\\nPriority: ' + $json.priority + '\\nImpact: ' + $json.impact + '\\n\\nAction Steps:\\n' + $json.actionSteps }}",
"projects": [
"<__PLACEHOLDER_VALUE__Asana project ID for strategy tasks__>"
]
}
},
"typeVersion": 1
},
{
"id": "b6076620-8da2-4711-8059-b3ce424b23de",
"name": "Route by Priority",
"type": "n8n-nodes-base.switch",
"position": [
4368,
1696
],
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.priority }}",
"rightValue": "high"
}
]
}
},
{
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.priority }}",
"rightValue": "medium"
}
]
}
},
{
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.priority }}",
"rightValue": "low"
}
]
}
}
]
},
"options": {}
},
"typeVersion": 3.4
},
{
"id": "9184da7f-6861-4893-b4c5-04bca91a3996",
"name": "Check Data Quality",
"type": "n8n-nodes-base.if",
"position": [
2672,
2080
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": false,
"typeValidation": "loose"
},
"combinator": "and",
"conditions": [
{
"id": "id-1",
"operator": {
"type": "number",
"operation": "gte"
},
"leftValue": "={{ $json.qualityScore }}",
"rightValue": "70"
}
]
}
},
"typeVersion": 2.3
},
{
"id": "30a2391f-51f9-4d79-a2ac-902366eb5391",
"name": "Send High Priority Alert",
"type": "n8n-nodes-base.slack",
"position": [
4624,
1760
],
"parameters": {
"text": "=\ud83d\udea8 HIGH PRIORITY Strategic Recommendation: {{ $json.title }}\n\nCategory: {{ $json.category }}\nImpact: {{ $json.impact }}\n\nDescription: {{ $json.description }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "<__PLACEHOLDER_VALUE__Slack channel ID for high priority alerts__>"
},
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2.4
},
{
"id": "1d0003e9-d48e-4194-a433-9bfacf4ad96b",
"name": "Store Analysis Results",
"type": "n8n-nodes-base.postgres",
"position": [
4144,
1984
],
"parameters": {
"table": {
"__rl": true,
"mode": "name",
"value": "<__PLACEHOLDER_VALUE__Database table name for analysis results__>"
},
"schema": {
"__rl": true,
"mode": "list",
"value": "public"
},
"options": {}
},
"typeVersion": 2.6
},
{
"id": "a513f792-8cc5-4d17-9ac6-8e15b3293ee5",
"name": "Log to Dashboard",
"type": "n8n-nodes-base.googleSheets",
"position": [
4800,
2032
],
"parameters": {
"columns": {
"value": {
"date": "={{ $now.format('yyyy-MM-dd') }}",
"title": "={{ $json.title }}",
"impact": "={{ $json.impact }}",
"status": "New",
"category": "={{ $json.category }}",
"priority": "={{ $json.priority }}"
},
"mappingMode": "defineBelow"
},
"options": {},
"operation": "append",
"sheetName": {
"__rl": true,
"mode": "name",
"value": "Strategy Recommendations"
},
"documentId": {
"__rl": true,
"mode": "id",
"value": "<__PLACEHOLDER_VALUE__Google Sheets document ID for dashboard__>"
}
},
"credentials": {
"googleSheetsOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 4.7
},
{
"id": "788cce64-2252-45e5-8639-44d2ae9d82eb",
"name": "Calculate Metrics",
"type": "n8n-nodes-base.set",
"position": [
3920,
1936
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "totalRecommendations",
"type": "number",
"value": "={{ $json.recommendations.length }}"
},
{
"id": "id-2",
"name": "highPriorityCount",
"type": "number",
"value": "={{ $json.recommendations.filter(r => r.priority === 'high').length }}"
},
{
"id": "id-3",
"name": "mediumPriorityCount",
"type": "number",
"value": "={{ $json.recommendations.filter(r => r.priority === 'medium').length }}"
},
{
"id": "id-4",
"name": "lowPriorityCount",
"type": "number",
"value": "={{ $json.recommendations.filter(r => r.priority === 'low').length }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "2bde5bd8-2864-4e2c-9ea4-30a1fd053941",
"name": "Validate Data Quality",
"type": "n8n-nodes-base.code",
"position": [
2448,
2080
],
"parameters": {
"jsCode": "// Validate data quality from merged department data\nconst items = $input.all();\n\nconst qualityIssues = [];\nlet totalFields = 0;\nlet missingFields = 0;\nlet anomalies = [];\n\n// Check if we have data from all departments\nconst expectedDepartments = ['sales', 'marketing', 'finance', 'support'];\nconst departmentsPresent = new Set();\n\nitems.forEach((item, index) => {\n const data = item.json;\n \n // Identify department from data structure or source\n if (data.department) {\n departmentsPresent.add(data.department.toLowerCase());\n }\n \n // Check for missing or null fields\n Object.keys(data).forEach(key => {\n totalFields++;\n if (data[key] === null || data[key] === undefined || data[key] === '') {\n missingFields++;\n qualityIssues.push({\n type: 'missing_field',\n item: index,\n field: key,\n severity: 'medium'\n });\n }\n });\n \n // Check for numeric anomalies (negative values where they shouldn't be)\n Object.keys(data).forEach(key => {\n if (typeof data[key] === 'number') {\n if (data[key] < 0 && (key.includes('revenue') || key.includes('count') || key.includes('total'))) {\n anomalies.push({\n type: 'negative_value',\n item: index,\n field: key,\n value: data[key],\n severity: 'high'\n });\n }\n }\n });\n});\n\n// Check for missing departments\nexpectedDepartments.forEach(dept => {\n if (!departmentsPresent.has(dept)) {\n qualityIssues.push({\n type: 'missing_department',\n department: dept,\n severity: 'high'\n });\n }\n});\n\n// Calculate quality score (0-100)\nconst completenessScore = totalFields > 0 ? ((totalFields - missingFields) / totalFields) * 100 : 0;\nconst departmentScore = (departmentsPresent.size / expectedDepartments.length) * 100;\nconst anomalyPenalty = Math.min(anomalies.length * 5, 30); // Max 30 point penalty\n\nconst qualityScore = Math.max(0, Math.round((completenessScore * 0.5 + departmentScore * 0.5) - anomalyPenalty));\n\n// Determine overall quality status\nlet qualityStatus = 'excellent';\nif (qualityScore < 50) {\n qualityStatus = 'poor';\n} else if (qualityScore < 70) {\n qualityStatus = 'fair';\n} else if (qualityScore < 85) {\n qualityStatus = 'good';\n}\n\n// Combine all issues\nconst allIssues = [...qualityIssues, ...anomalies];\n\n// Return validation results\nreturn [{\n json: {\n qualityScore: qualityScore,\n qualityStatus: qualityStatus,\n totalFields: totalFields,\n missingFields: missingFields,\n completenessPercentage: Math.round(completenessScore),\n departmentsPresent: Array.from(departmentsPresent),\n departmentsMissing: expectedDepartments.filter(d => !departmentsPresent.has(d)),\n anomalyCount: anomalies.length,\n issueCount: allIssues.length,\n issues: allIssues,\n highSeverityIssues: allIssues.filter(i => i.severity === 'high').length,\n passesQualityCheck: qualityScore >= 70,\n validatedAt: new Date().toISOString(),\n originalData: items\n }\n}];"
},
"typeVersion": 2
},
{
"id": "004304ac-6fde-42ee-9be3-90feb6ff6639",
"name": "Send Data Quality Warning",
"type": "n8n-nodes-base.slack",
"position": [
2896,
2096
],
"parameters": {
"text": "=\u26a0\ufe0f Data Quality Warning: Quality score below threshold. Issues: {{ $json.qualityIssues }}",
"select": "channel",
"channelId": {
"__rl": true,
"mode": "id",
"value": "<__PLACEHOLDER_VALUE__Slack channel ID for data quality alerts__>"
},
"otherOptions": {},
"authentication": "oAuth2"
},
"credentials": {
"slackOAuth2Api": {
"name": "<your credential>"
}
},
"typeVersion": 2.4
},
{
"id": "17f09db1-24e8-4c2e-b800-412b14063e36",
"name": "Enrich with Historical Data",
"type": "n8n-nodes-base.set",
"position": [
3344,
1936
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "id-1",
"name": "historicalTrends",
"type": "array",
"value": "={{ $('Fetch Historical Trends').all() }}"
},
{
"id": "id-2",
"name": "trendAnalysis",
"type": "string",
"value": "={{ JSON.stringify($('Fetch Historical Trends').all()) }}"
}
]
},
"includeOtherFields": true
},
"typeVersion": 3.4
},
{
"id": "2b58303b-0fdb-445c-891f-7880e5da8f0e",
"name": "Fetch Historical Trends",
"type": "n8n-nodes-base.httpRequest",
"position": [
3120,
1936
],
"parameters": {
"url": "<__PLACEHOLDER_VALUE__Historical trends API endpoint__>",
"options": {},
"authentication": "predefinedCredentialType"
},
"typeVersion": 4.3
},
{
"id": "3e6aa38f-64f0-447c-b627-ec50344e6912",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
1488,
1280
],
"parameters": {
"width": 912,
"height": 208,
"content": "## How It Works\nAutomates sales data analysis and strategic insight generation for sales managers and strategists needing actionable intelligence. Fetches multi-source data from sales, marketing, and financial systems, validates data quality to prevent errors, applies advanced AI analysis via OpenAI to identify market trends and patterns, calculates comprehensive KPIs for performance measurement, generates prioritized recommendations, and automatically distributes detailed insights via Gmail alerts and Google Sheets dashboards\u2014eliminating time-consuming manual analysis overhead."
},
"typeVersion": 1
},
{
"id": "a643c5ae-7a91-4a4d-83b2-7f4443d236dd",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
2464,
1280
],
"parameters": {
"color": 3,
"width": 352,
"height": 224,
"content": "## Setup Steps\n1. **OpenAI API**: Add key via credentials\n2. **Gmail**: Authorize account for email delivery\n3. **Google Sheets**: Connect for dashboard logging\n4. **Schedule**: Set monthly trigger timing\n5. **Modify data sources**: Replace fetch nodes with your APIs"
},
"typeVersion": 1
},
{
"id": "e6f5916f-1f2b-468b-bd3a-a8a31bc4ff2b",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2880,
1280
],
"parameters": {
"color": 4,
"content": "## Prerequisites\nOpenAI API key, Gmail account with send permissions, Google Sheets access, n8n instance, source data APIs (sales, marketing, financial systems)."
},
"typeVersion": 1
},
{
"id": "e9c2d441-5b4e-4f7d-a39f-d7e54724b79f",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
3168,
1280
],
"parameters": {
"color": 5,
"width": 336,
"height": 176,
"content": "\n## Use Cases\nE-commerce platforms analyzing sales trends; SaaS companies generating strategy reports; multi-channel retailers routing recommendations; "
},
"typeVersion": 1
},
{
"id": "f75c3157-7aba-431a-ba55-17cafe9b1326",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
3552,
1296
],
"parameters": {
"color": 6,
"width": 400,
"height": 144,
"content": "## Customization\nAdd data sources via fetch nodes; swap OpenAI for Claude or Gemini; modify routing logic for different priority thresholds; \n"
},
"typeVersion": 1
},
{
"id": "73749958-209c-4c87-bfb3-b881113b6982",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
1472,
1552
],
"parameters": {
"color": 7,
"width": 864,
"height": 720,
"content": "## Data Collection:\nMonthly trigger gathers sales, marketing, financial data for analysis foundation. \n\n**Why:** Aggregating data at regular intervals creates a standardized,\n comprehensive snapshot that captures business performance\n "
},
"typeVersion": 1
},
{
"id": "66595d8d-3233-4a74-9429-6c26c4af0bd9",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
4016,
1296
],
"parameters": {
"color": 4,
"width": 400,
"height": 128,
"content": "## Benefits\nReduces analysis time from hours to minutes. Eliminates manual report crea"
},
"typeVersion": 1
},
{
"id": "453d4d99-fab3-4646-960d-535945b9d120",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
2352,
1552
],
"parameters": {
"color": 7,
"width": 688,
"height": 720,
"content": "## **Quality Check:** \nValidates data integrity, preventing analysis errors. \n\n**Why:** Validation acts as a critical filter that protects decision quality."
},
"typeVersion": 1
},
{
"id": "2bb238f0-a460-4770-bbc1-768b986a6ae8",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
3056,
1552
],
"parameters": {
"color": 7,
"width": 800,
"height": 720,
"content": "## **AI Analysis:** \nOpenAI identifies trends and generates insights. \n\n**Why:** Large datasets contain patterns invisible to manual review, and AI can process volumes humans cannot. \n"
},
"typeVersion": 1
},
{
"id": "91e7386b-6d1a-4bb8-ba4a-391a3a38c9be",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
3888,
1552
],
"parameters": {
"color": 7,
"width": 608,
"height": 720,
"content": "## **Smart Routing:** \nPrioritizes recommendations by urgency for decision-makers. \n\n**Why:** Prioritizing by urgency ensures executives see what matters most first, improving response time to critical business changes."
},
"typeVersion": 1
},
{
"id": "e6e9c8f6-d1b4-429a-bccd-04d39e49c148",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
4512,
1552
],
"parameters": {
"color": 7,
"width": 496,
"height": 720,
"content": "## **Metrics & Distribution:** \nCalculates KPIs and sends reports via Gmail and Sheets. \n\n**Why:** KPIs translate raw insights into measurable business language via Gmail and Sheets"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "6247ca2a-4a68-49d8-a6af-fb623892265b",
"connections": {
"Merge All Data": {
"main": [
[
{
"node": "Build Unified Data Model",
"type": "main",
"index": 0
},
{
"node": "Validate Data Quality",
"type": "main",
"index": 0
}
]
]
},
"Fetch Sales Data": {
"main": [
[
{
"node": "Merge All Data",
"type": "main",
"index": 0
}
]
]
},
"Monthly Schedule": {
"main": [
[
{
"node": "Workflow Configuration",
"type": "main",
"index": 0
}
]
]
},
"Calculate Metrics": {
"main": [
[
{
"node": "Store Analysis Results",
"type": "main",
"index": 0
},
{
"node": "Split Recommendations",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "AI Strategy Analyzer",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Route by Priority": {
"main": [
[
{
"node": "Send High Priority Alert",
"type": "main",
"index": 0
},
{
"node": "Send Strategy Report",
"type": "main",
"index": 0
},
{
"node": "Create Tasks in Asana",
"type": "main",
"index": 0
}
]
]
},
"Check Data Quality": {
"main": [
[
{
"node": "Build Unified Data Model",
"type": "main",
"index": 0
}
],
[
{
"node": "Send Data Quality Warning",
"type": "main",
"index": 0
}
]
]
},
"Fetch Finance Data": {
"main": [
[
{
"node": "Merge All Data",
"type": "main",
"index": 0
}
]
]
},
"Fetch Support Data": {
"main": [
[
{
"node": "Merge All Data",
"type": "main",
"index": 0
}
]
]
},
"AI Strategy Analyzer": {
"main": [
[
{
"node": "Split Recommendations",
"type": "main",
"index": 0
},
{
"node": "Calculate Metrics",
"type": "main",
"index": 0
}
]
]
},
"Fetch Marketing Data": {
"main": [
[
{
"node": "Merge All Data",
"type": "main",
"index": 0
}
]
]
},
"Send Strategy Report": {
"main": [
[
{
"node": "Log to Dashboard",
"type": "main",
"index": 0
}
]
]
},
"Create Tasks in Asana": {
"main": [
[
{
"node": "Log to Dashboard",
"type": "main",
"index": 0
}
]
]
},
"Split Recommendations": {
"main": [
[
{
"node": "Send Strategy Report",
"type": "main",
"index": 0
},
{
"node": "Create Tasks in Asana",
"type": "main",
"index": 0
},
{
"node": "Route by Priority",
"type": "main",
"index": 0
}
]
]
},
"Validate Data Quality": {
"main": [
[
{
"node": "Check Data Quality",
"type": "main",
"index": 0
}
]
]
},
"Workflow Configuration": {
"main": [
[
{
"node": "Fetch Sales Data",
"type": "main",
"index": 0
},
{
"node": "Fetch Marketing Data",
"type": "main",
"index": 0
},
{
"node": "Fetch Finance Data",
"type": "main",
"index": 0
},
{
"node": "Fetch Support Data",
"type": "main",
"index": 0
}
]
]
},
"Fetch Historical Trends": {
"main": [
[
{
"node": "Enrich with Historical Data",
"type": "main",
"index": 0
}
]
]
},
"Build Unified Data Model": {
"main": [
[
{
"node": "AI Strategy Analyzer",
"type": "main",
"index": 0
},
{
"node": "Fetch Historical Trends",
"type": "main",
"index": 0
}
]
]
},
"Structured Output Parser": {
"ai_outputParser": [
[
{
"node": "AI Strategy Analyzer",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Enrich with Historical Data": {
"main": [
[
{
"node": "AI Strategy Analyzer",
"type": "main",
"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.
gmailOAuth2googleSheetsOAuth2ApiopenAiApislackOAuth2Api
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
Automates sales data analysis and strategic insight generation for sales managers and strategists needing actionable intelligence. Fetches multi-source data from sales, marketing, and financial systems, validates data quality to prevent errors, applies advanced AI analysis via…
Source: https://n8n.io/workflows/11708/ — 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 n8n automation workflow automates the creation, scripting, production, and posting of YouTube videos. It leverages AI (OpenAI), image generation (PIAPI), video rendering (Shotstack), and platform
Created by: Peyton Leveillee Last updated: October 2025
SEO Blog Article Generation Workflow. Uses outputParserStructured, httpRequest, agent, lmChatOpenAi. Scheduled trigger; 56 nodes.
This workflow was born out of a very real problem.
This workflow automates end-to-end sustainability lifecycle management for corporate sustainability teams, ESG governance officers, and circular economy programme leads. It addresses the challenge of