This workflow corresponds to n8n.io template #10176 — we link there as the canonical source.
This workflow follows the Emailsend → 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 →
{
"nodes": [
{
"id": "1db8cf8c-ac58-46a4-9222-6306c71c3368",
"name": "Schedule Competitor Check",
"type": "n8n-nodes-base.scheduleTrigger",
"notes": "Runs twice daily to monitor competitor offers automatically",
"position": [
-1120,
240
],
"parameters": {
"rule": {
"interval": [
{
"field": "hours",
"hoursInterval": 12
}
]
}
},
"typeVersion": 1.2
},
{
"id": "3d6e51b2-80ab-4781-8783-50a6f43487d5",
"name": "Scrape Competitor Sites",
"type": "n8n-nodes-base.httpRequest",
"notes": "Uses Bright Data API to scrape competitor affiliate pages",
"position": [
-896,
240
],
"parameters": {
"url": "https://api.brightdata.com/datasets/v3/trigger",
"method": "POST",
"options": {},
"sendBody": true,
"sendHeaders": true,
"authentication": "genericCredentialType",
"bodyParameters": {
"parameters": [
{
"name": "dataset_id",
"value": "gd_l7q7dkf244hwjntr0"
},
{
"name": "url",
"value": "={{$json.competitorUrl}}"
},
{
"name": "format",
"value": "json"
}
]
},
"genericAuthType": "httpHeaderAuth",
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
}
},
"typeVersion": 4.2
},
{
"id": "95e9a310-42f7-4791-ba94-524632e63473",
"name": "AI Offer Analysis",
"type": "n8n-nodes-base.code",
"notes": "Analyzes competitor offers and identifies threats to your program",
"position": [
-672,
240
],
"parameters": {
"jsCode": "// AI-powered competitive offer analysis\nconst items = $input.all();\nconst analyzedItems = [];\n\nfor (const item of items) {\n const data = item.json;\n let competitiveScore = 0;\n let insights = [];\n let recommendations = [];\n let alertLevel = 'normal';\n \n // Extract competitor data\n const competitorName = data.competitorName || 'Unknown';\n const commissionRate = parseFloat(data.commissionRate) || 0;\n const cookieDuration = parseInt(data.cookieDuration) || 0;\n const averageOrderValue = parseFloat(data.averageOrderValue) || 0;\n const conversionRate = parseFloat(data.conversionRate) || 0;\n const payoutThreshold = parseFloat(data.payoutThreshold) || 0;\n \n // Get your current rates from workflow context\n const yourCommissionRate = 10; // Your current rate\n const yourCookieDuration = 30; // Your cookie days\n const yourAOV = 150; // Your AOV\n \n // Commission Rate Analysis\n const commissionDiff = commissionRate - yourCommissionRate;\n if (commissionDiff > 5) {\n competitiveScore += 35;\n insights.push(`HIGH ALERT: ${competitorName} offers ${commissionRate}% commission vs your ${yourCommissionRate}% (+${commissionDiff.toFixed(1)}% advantage)`);\n recommendations.push(`URGENT: Consider matching or beating ${competitorName}'s ${commissionRate}% commission rate`);\n alertLevel = 'critical';\n } else if (commissionDiff > 2) {\n competitiveScore += 25;\n insights.push(`WARNING: ${competitorName} offers ${commissionRate}% commission vs your ${yourCommissionRate}% (+${commissionDiff.toFixed(1)}% advantage)`);\n recommendations.push(`Review commission structure to stay competitive with ${competitorName}`);\n alertLevel = alertLevel === 'critical' ? 'critical' : 'warning';\n } else if (commissionDiff > 0) {\n competitiveScore += 15;\n insights.push(`${competitorName} offers slightly higher commission: ${commissionRate}% vs ${yourCommissionRate}%`);\n } else if (commissionDiff < -3) {\n insights.push(`YOUR ADVANTAGE: You offer ${yourCommissionRate}% vs ${competitorName}'s ${commissionRate}% (-${Math.abs(commissionDiff).toFixed(1)}% in your favor)`);\n recommendations.push(`Promote your superior ${yourCommissionRate}% commission rate in affiliate recruitment`);\n } else {\n insights.push(`Commission rates are competitive: ${commissionRate}% vs your ${yourCommissionRate}%`);\n }\n \n // Cookie Duration Analysis\n const cookieDiff = cookieDuration - yourCookieDuration;\n if (cookieDiff > 30) {\n competitiveScore += 25;\n insights.push(`HIGH ALERT: ${competitorName} offers ${cookieDuration}-day cookies vs your ${yourCookieDuration} days`);\n recommendations.push(`URGENT: Extend cookie duration to match ${competitorName}'s ${cookieDuration} days`);\n alertLevel = 'critical';\n } else if (cookieDiff > 15) {\n competitiveScore += 15;\n insights.push(`WARNING: ${competitorName} offers longer cookies: ${cookieDuration} vs ${yourCookieDuration} days`);\n recommendations.push(`Consider extending cookie duration to improve conversion attribution`);\n alertLevel = alertLevel === 'critical' ? 'critical' : 'warning';\n } else if (cookieDiff > 0) {\n competitiveScore += 8;\n insights.push(`${competitorName} has slightly longer cookies: ${cookieDuration} vs ${yourCookieDuration} days`);\n } else if (cookieDiff < -15) {\n insights.push(`YOUR ADVANTAGE: ${yourCookieDuration}-day cookies vs ${competitorName}'s ${cookieDuration} days`);\n recommendations.push(`Highlight your superior ${yourCookieDuration}-day cookie window in marketing`);\n }\n \n // Average Order Value Analysis\n const aovDiff = averageOrderValue - yourAOV;\n if (averageOrderValue > 0) {\n if (aovDiff > 100) {\n competitiveScore += 20;\n insights.push(`${competitorName} has higher AOV: $${averageOrderValue} vs your $${yourAOV}`);\n recommendations.push(`Target higher-value products or bundles to compete with ${competitorName}`);\n } else if (aovDiff > 50) {\n competitiveScore += 10;\n insights.push(`${competitorName} AOV slightly higher: $${averageOrderValue} vs $${yourAOV}`);\n } else if (aovDiff < -50) {\n insights.push(`YOUR ADVANTAGE: Higher AOV of $${yourAOV} vs ${competitorName}'s $${averageOrderValue}`);\n recommendations.push(`Emphasize your higher earnings per conversion: $${yourAOV}`);\n }\n }\n \n // Conversion Rate Analysis\n if (conversionRate > 0) {\n if (conversionRate > 5) {\n competitiveScore += 15;\n insights.push(`${competitorName} reports strong ${conversionRate}% conversion rate`);\n recommendations.push(`Research ${competitorName}'s landing page optimization tactics`);\n } else if (conversionRate > 3) {\n competitiveScore += 8;\n insights.push(`${competitorName} has good ${conversionRate}% conversion rate`);\n }\n }\n \n // Payout Analysis\n if (payoutThreshold > 0) {\n if (payoutThreshold < 50) {\n competitiveScore += 10;\n insights.push(`${competitorName} has low $${payoutThreshold} payout threshold (affiliate-friendly)`);\n recommendations.push(`Consider lowering your payout threshold to improve cash flow for affiliates`);\n } else if (payoutThreshold > 100) {\n insights.push(`YOUR ADVANTAGE: Lower payout threshold than ${competitorName}'s $${payoutThreshold}`);\n }\n }\n \n // Calculate EPC (Earnings Per Click)\n const theirEPC = (averageOrderValue * commissionRate / 100 * conversionRate / 100).toFixed(2);\n const yourEPC = (yourAOV * yourCommissionRate / 100 * 3 / 100).toFixed(2); // Assuming 3% conversion\n \n if (parseFloat(theirEPC) > parseFloat(yourEPC) * 1.3) {\n insights.push(`ALERT: ${competitorName} estimated EPC $${theirEPC} vs your $${yourEPC}`);\n recommendations.push(`Focus on improving your EPC through better commission or conversion optimization`);\n } else if (parseFloat(yourEPC) > parseFloat(theirEPC) * 1.2) {\n insights.push(`YOUR ADVANTAGE: Superior EPC of $${yourEPC} vs ${competitorName}'s $${theirEPC}`);\n recommendations.push(`Promote your higher earnings potential: $${yourEPC} EPC`);\n }\n \n // Determine threat level\n let threatLevel = 'Low';\n if (competitiveScore >= 70) {\n threatLevel = 'Critical';\n } else if (competitiveScore >= 45) {\n threatLevel = 'High';\n } else if (competitiveScore >= 25) {\n threatLevel = 'Medium';\n }\n \n // Strategic recommendations based on threat\n if (threatLevel === 'Critical' || threatLevel === 'High') {\n recommendations.push('Schedule emergency meeting with affiliate team');\n recommendations.push('Analyze affiliate churn risk immediately');\n recommendations.push('Prepare competitive response strategy within 48 hours');\n } else if (threatLevel === 'Medium') {\n recommendations.push('Monitor closely for additional changes');\n recommendations.push('Survey top affiliates about competitive pressures');\n } else {\n recommendations.push('Continue monitoring - maintain current competitive position');\n recommendations.push('Look for opportunities to widen competitive advantage');\n }\n \n analyzedItems.push({\n json: {\n ...data,\n competitorName: competitorName,\n competitiveScore: competitiveScore,\n threatLevel: threatLevel,\n alertLevel: alertLevel,\n insights: insights,\n recommendations: recommendations,\n comparison: {\n commission: {\n theirs: commissionRate,\n yours: yourCommissionRate,\n diff: commissionDiff.toFixed(1)\n },\n cookies: {\n theirs: cookieDuration,\n yours: yourCookieDuration,\n diff: cookieDiff\n },\n aov: {\n theirs: averageOrderValue,\n yours: yourAOV,\n diff: aovDiff.toFixed(2)\n },\n epc: {\n theirs: theirEPC,\n yours: yourEPC\n }\n },\n analyzedAt: new Date().toISOString()\n }\n });\n}\n\nreturn analyzedItems;"
},
"typeVersion": 2
},
{
"id": "e97dc192-289e-4e33-b2fc-16f50cdd276a",
"name": "Route by Threat Level",
"type": "n8n-nodes-base.if",
"notes": "Separates critical threats from routine competitive intelligence",
"position": [
-448,
240
],
"parameters": {
"options": {},
"conditions": {
"options": {
"leftValue": "",
"caseSensitive": false,
"typeValidation": "strict"
},
"combinator": "or",
"conditions": [
{
"id": "critical-threat",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.threatLevel }}",
"rightValue": "Critical"
},
{
"id": "high-threat",
"operator": {
"type": "string",
"operation": "equals"
},
"leftValue": "={{ $json.threatLevel }}",
"rightValue": "High"
}
]
}
},
"typeVersion": 2
},
{
"id": "433b0b95-e1e6-4dc9-b5ae-6ba579f3c7f0",
"name": "Log to Competitor Dashboard",
"type": "n8n-nodes-base.googleSheets",
"notes": "Records all competitive intelligence to centralized tracking sheet",
"position": [
0,
48
],
"parameters": {
"columns": {
"value": {
"Date": "={{ $now.toFormat('yyyy-MM-dd') }}",
"Score": "={{ $json.competitiveScore }}",
"Your AOV": "$={{ $json.comparison.aov.yours }}",
"Your EPC": "$={{ $json.comparison.epc.yours }}",
"Their AOV": "$={{ $json.comparison.aov.theirs }}",
"Their EPC": "$={{ $json.comparison.epc.theirs }}",
"Competitor": "={{ $json.competitorName }}",
"Threat Level": "={{ $json.threatLevel }}",
"Your Cookies": "={{ $json.comparison.cookies.yours }} days",
"Their Cookies": "={{ $json.comparison.cookies.theirs }} days",
"Commission Diff": "={{ $json.comparison.commission.diff }}%",
"Your Commission": "={{ $json.comparison.commission.yours }}%",
"Their Commission": "={{ $json.comparison.commission.theirs }}%"
},
"mappingMode": "defineBelow"
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=0",
"cachedResultName": "Competitor Analysis"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "your-competitor-tracking-spreadsheet-id",
"cachedResultName": "Affiliate Competitor Intelligence"
}
},
"typeVersion": 4.4
},
{
"id": "46260c58-cdff-4bcb-991d-62d09b53e360",
"name": "Archive All Data",
"type": "n8n-nodes-base.googleSheets",
"notes": "Maintains historical record for trend analysis over time",
"position": [
-224,
432
],
"parameters": {
"columns": {
"value": {
"AOV": "$={{ $json.comparison.aov.theirs }}",
"EPC": "$={{ $json.comparison.epc.theirs }}",
"Alert": "={{ $json.alertLevel }}",
"Threat": "={{ $json.threatLevel }}",
"Timestamp": "={{ $now.toISO() }}",
"Commission": "={{ $json.comparison.commission.theirs }}%",
"Competitor": "={{ $json.competitorName }}",
"Cookie Days": "={{ $json.comparison.cookies.theirs }}"
},
"mappingMode": "defineBelow"
},
"options": {},
"operation": "appendOrUpdate",
"sheetName": {
"__rl": true,
"mode": "list",
"value": "gid=1",
"cachedResultName": "Historical Log"
},
"documentId": {
"__rl": true,
"mode": "list",
"value": "your-competitor-tracking-spreadsheet-id",
"cachedResultName": "Affiliate Competitor Intelligence"
}
},
"typeVersion": 4.4
},
{
"id": "e7b22a6c-09b8-44cc-b92d-fde97f43b72f",
"name": "URGENT: Competitive Threat Alert",
"type": "n8n-nodes-base.slack",
"notes": "Immediate alert for critical competitive threats needing action",
"position": [
-224,
-96
],
"parameters": {
"text": "\ud83d\udea8 *CRITICAL COMPETITIVE THREAT DETECTED*\n\n*Competitor:* {{ $json.competitorName }}\n*Threat Level:* {{ $json.threatLevel }}\n*Competitive Score:* {{ $json.competitiveScore }}/100\n\n*\ud83d\udcca HEAD-TO-HEAD COMPARISON*\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n*Commission Rate:*\n\u2022 Theirs: {{ $json.comparison.commission.theirs }}%\n\u2022 Yours: {{ $json.comparison.commission.yours }}%\n\u2022 Difference: {{ $json.comparison.commission.diff }}%\n\n*Cookie Duration:*\n\u2022 Theirs: {{ $json.comparison.cookies.theirs }} days\n\u2022 Yours: {{ $json.comparison.cookies.yours }} days\n\n*Average Order Value:*\n\u2022 Theirs: ${{ $json.comparison.aov.theirs }}\n\u2022 Yours: ${{ $json.comparison.aov.yours }}\n\n*Earnings Per Click (EPC):*\n\u2022 Theirs: ${{ $json.comparison.epc.theirs }}\n\u2022 Yours: ${{ $json.comparison.epc.yours }}\n\n*\u26a0\ufe0f KEY INSIGHTS:*\n{{ $json.insights.join('\\n') }}\n\n*\ud83c\udfaf IMMEDIATE ACTION REQUIRED:*\n{{ $json.recommendations.join('\\n') }}\n\n_\u23f0 Response deadline: Within 48 hours_",
"otherOptions": {}
},
"typeVersion": 2.1
},
{
"id": "f4d4bf7d-11ce-4b9a-bf50-fd685fe2a97d",
"name": "Generate Strategic Report",
"type": "n8n-nodes-base.code",
"notes": "Creates detailed competitive intelligence reports for email distribution",
"position": [
-224,
240
],
"parameters": {
"jsCode": "// Generate comprehensive competitive intelligence report\nconst items = $input.all();\nconst reportItems = [];\n\nfor (const item of items) {\n const data = item.json;\n const competitor = data.competitorName || 'Competitor';\n const threat = data.threatLevel || 'Medium';\n const alertLevel = data.alertLevel || 'normal';\n \n let emailSubject = '';\n let emailBody = '';\n let priority = 'Medium';\n \n if (threat === 'Critical' || threat === 'High') {\n priority = 'Urgent';\n emailSubject = `\ud83d\udea8 URGENT: ${competitor} Competitive Threat - Immediate Action Required`;\n emailBody = `COMPETITIVE THREAT ALERT\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nDear Affiliate Team,\n\nWe've identified a ${threat.toUpperCase()}-LEVEL competitive threat that requires immediate strategic response.\n\n\ud83c\udfaf COMPETITOR OVERVIEW\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\nCompetitor: ${competitor}\nThreat Level: ${threat}\nCompetitive Score: ${data.competitiveScore}/100\nAlert Level: ${alertLevel.toUpperCase()}\n\n\ud83d\udcca COMPETITIVE COMPARISON\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\n\ud83d\udd39 COMMISSION RATES\n ${competitor}: ${data.comparison.commission.theirs}%\n Your Program: ${data.comparison.commission.yours}%\n Gap: ${data.comparison.commission.diff}%\n ${parseFloat(data.comparison.commission.diff) > 0 ? '\u26a0\ufe0f DISADVANTAGE' : '\u2705 ADVANTAGE'}\n\n\ud83d\udd39 COOKIE DURATION\n ${competitor}: ${data.comparison.cookies.theirs} days\n Your Program: ${data.comparison.cookies.yours} days\n ${data.comparison.cookies.theirs > data.comparison.cookies.yours ? '\u26a0\ufe0f THEY HAVE LONGER TRACKING' : '\u2705 YOU HAVE BETTER TRACKING'}\n\n\ud83d\udd39 AVERAGE ORDER VALUE\n ${competitor}: $${data.comparison.aov.theirs}\n Your Program: $${data.comparison.aov.yours}\n\n\ud83d\udd39 EARNINGS PER CLICK (EPC)\n ${competitor}: $${data.comparison.epc.theirs}\n Your Program: $${data.comparison.epc.yours}\n ${parseFloat(data.comparison.epc.theirs) > parseFloat(data.comparison.epc.yours) ? '\u26a0\ufe0f THEY OFFER BETTER EARNINGS' : '\u2705 YOU OFFER BETTER EARNINGS'}\n\n\u26a0\ufe0f CRITICAL INSIGHTS\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n${data.insights.map((insight, i) => `${i + 1}. ${insight}`).join('\\n')}\n\n\ud83c\udfaf STRATEGIC RECOMMENDATIONS\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n${data.recommendations.map((rec, i) => `${i + 1}. ${rec}`).join('\\n')}\n\n\u23f0 IMMEDIATE ACTION ITEMS\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n1. Schedule emergency affiliate strategy meeting within 24 hours\n2. Assess affiliate churn risk with top 20 partners\n3. Develop counter-strategy and updated commission structure\n4. Prepare affiliate communication addressing competitive landscape\n5. Review budget for potential commission rate adjustments\n\n\ud83d\udcc8 BUSINESS IMPACT ASSESSMENT\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\u2022 Risk of Affiliate Defection: ${threat === 'Critical' ? 'VERY HIGH' : 'HIGH'}\n\u2022 Estimated Monthly Revenue at Risk: Review with finance team\n\u2022 Competitive Response Timeline: 48-72 hours maximum\n\u2022 Market Position: ${threat === 'Critical' ? 'DETERIORATING' : 'AT RISK'}\n\nThis competitive intelligence was detected through our automated monitoring system. Please treat this information as confidential and time-sensitive.\n\nBest regards,\nAffiliate Intelligence System\n\n---\nGenerated: ${new Date().toLocaleString()}\nNext Check: In 12 hours`;\n } else {\n emailSubject = `\ud83d\udcca Competitive Intelligence Report: ${competitor}`;\n emailBody = `COMPETITIVE INTELLIGENCE UPDATE\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nDear Affiliate Team,\n\nHere's your regular competitive intelligence update for ${competitor}.\n\n\ud83d\udcca CURRENT STANDING\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\nThreat Level: ${threat}\nCompetitive Score: ${data.competitiveScore}/100\n\n\ud83d\udd0d COMPETITIVE ANALYSIS\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n\nCommission Rates:\n\u2022 ${competitor}: ${data.comparison.commission.theirs}%\n\u2022 Your Program: ${data.comparison.commission.yours}%\n\nCookie Duration:\n\u2022 ${competitor}: ${data.comparison.cookies.theirs} days\n\u2022 Your Program: ${data.comparison.cookies.yours} days\n\nEarnings Per Click:\n\u2022 ${competitor}: $${data.comparison.epc.theirs}\n\u2022 Your Program: $${data.comparison.epc.yours}\n\n\ud83d\udca1 KEY INSIGHTS\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n${data.insights.map((insight, i) => `${i + 1}. ${insight}`).join('\\n')}\n\n\ud83d\udccb RECOMMENDATIONS\n\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\n${data.recommendations.map((rec, i) => `${i + 1}. ${rec}`).join('\\n')}\n\nContinue monitoring for changes in competitive positioning.\n\nBest regards,\nAffiliate Intelligence System\n\n---\nGenerated: ${new Date().toLocaleString()}`;\n }\n \n reportItems.push({\n json: {\n ...data,\n emailSubject: emailSubject,\n emailBody: emailBody,\n priority: priority,\n requiresUrgentAction: threat === 'Critical' || threat === 'High',\n estimatedResponseTime: threat === 'Critical' ? '24 hours' : threat === 'High' ? '48 hours' : '1 week'\n }\n });\n}\n\nreturn reportItems;"
},
"typeVersion": 2
},
{
"id": "b7ae2883-2bf2-437a-9da2-fea3d99f2259",
"name": "Email Affiliate Team",
"type": "n8n-nodes-base.emailSend",
"notes": "Sends comprehensive competitive analysis reports to affiliate management team",
"position": [
0,
240
],
"parameters": {
"options": {
"replyTo": "user@example.com",
"allowUnauthorizedCerts": false
},
"subject": "={{ $json.emailSubject }}",
"toEmail": "user@example.com",
"fromEmail": "user@example.com"
},
"typeVersion": 2.1
},
{
"id": "747e1f46-51f9-45f5-872f-5ee4d2132d77",
"name": "Routine Monitoring Alert",
"type": "n8n-nodes-base.slack",
"notes": "Regular updates for medium/low threats requiring ongoing monitoring",
"position": [
-224,
624
],
"parameters": {
"text": "\ud83d\udcca *Competitive Intelligence Update*\n\n*Competitor:* {{ $json.competitorName }}\n*Threat Level:* {{ $json.threatLevel }}\n*Score:* {{ $json.competitiveScore }}/100\n\n*Quick Comparison:*\n\u2022 Commission: {{ $json.comparison.commission.theirs }}% (yours: {{ $json.comparison.commission.yours }}%)\n\u2022 Cookies: {{ $json.comparison.cookies.theirs }} days (yours: {{ $json.comparison.cookies.yours }})\n\u2022 EPC: ${{ $json.comparison.epc.theirs }} (yours: ${{ $json.comparison.epc.yours }})\n\n_No immediate action required - monitoring continues_",
"otherOptions": {}
},
"typeVersion": 2.1
},
{
"id": "f0bde90a-49ea-4493-bb42-60664086ef84",
"name": "Calculate Market Position",
"type": "n8n-nodes-base.set",
"notes": "Aggregates competitive intelligence into market position summary metrics",
"position": [
224,
144
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "total-competitors",
"name": "totalCompetitors",
"type": "number",
"value": "={{ $input.all().length }}"
},
{
"id": "critical-threats",
"name": "criticalThreats",
"type": "number",
"value": "={{ $input.all().filter(item => item.json.threatLevel === 'Critical').length }}"
},
{
"id": "high-threats",
"name": "highThreats",
"type": "number",
"value": "={{ $input.all().filter(item => item.json.threatLevel === 'High').length }}"
},
{
"id": "medium-threats",
"name": "mediumThreats",
"type": "number",
"value": "={{ $input.all().filter(item => item.json.threatLevel === 'Medium').length }}"
},
{
"id": "low-threats",
"name": "lowThreats",
"type": "number",
"value": "={{ $input.all().filter(item => item.json.threatLevel === 'Low').length }}"
},
{
"id": "avg-score",
"name": "avgCompetitiveScore",
"type": "string",
"value": "={{ ($input.all().reduce((sum, item) => sum + (item.json.competitiveScore || 0), 0) / $input.all().length).toFixed(1) }}"
},
{
"id": "market-summary",
"name": "marketPositionSummary",
"type": "string",
"value": "\ud83d\udcca Competitive Landscape Summary\n\n{{ $('Calculate Market Position').item.json.totalCompetitors }} competitors monitored:\n\u2022 \ud83d\udea8 {{ $('Calculate Market Position').item.json.criticalThreats }} Critical Threats\n\u2022 \u26a0\ufe0f {{ $('Calculate Market Position').item.json.highThreats }} High Threats\n\u2022 \ud83d\udccb {{ $('Calculate Market Position').item.json.mediumThreats }} Medium Threats\n\u2022 \u2705 {{ $('Calculate Market Position').item.json.lowThreats }} Low Threats\n\nAvg Competitive Pressure: {{ $('Calculate Market Position').item.json.avgCompetitiveScore }}/100"
}
]
}
},
"typeVersion": 3.3
},
{
"id": "b3a3e3fc-690b-45d3-8cd1-b12ed23a3bdd",
"name": "Sticky Note",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1712,
16
],
"parameters": {
"width": 500,
"height": 620,
"content": "# \ud83c\udfaf Affiliate Competitor Intelligence System\n\nAutomatically monitors competitor affiliate programs using Bright Data web scraping API, analyzes commission rates, cookie durations, and payout terms, then alerts your team about competitive threats requiring immediate action.\n\n**AI Analysis:** Compares commission rates, cookie windows, AOV, EPC, and identifies critical competitive advantages/disadvantages.\n\n**Setup:**\n- Get Bright Data API credentials\n- Configure HTTP Request with your dataset ID\n- Add competitor URLs to monitor\n- Link Google Sheets for tracking\n- Configure Slack channels for alerts\n- Set up SMTP for email reports\n\n**Benefits:**\n- Never lose affiliates to better offers\n- Respond to competitive changes in 48hrs\n- Data-driven commission strategy\n- Automated market intelligence\n\n*Built by Daniel Shashko*\n[Connect on LinkedIn](https://www.linkedin.com/in/daniel-shashko/)"
},
"typeVersion": 1
},
{
"id": "c7e8b8eb-c11d-40a0-b430-62fe3789f570",
"name": "Sticky Note1",
"type": "n8n-nodes-base.stickyNote",
"position": [
-1152,
128
],
"parameters": {
"width": 160,
"height": 80,
"content": "Runs twice daily to monitor competitor offers automatically\n"
},
"typeVersion": 1
},
{
"id": "cce67763-13cb-4f69-b421-a5415295a209",
"name": "Sticky Note2",
"type": "n8n-nodes-base.stickyNote",
"position": [
-928,
112
],
"parameters": {
"width": 160,
"height": 96,
"content": "Uses Bright Data API to scrape competitor affiliate pages\n"
},
"typeVersion": 1
},
{
"id": "5253eb5b-dc0f-416a-9bc7-713cd0550e94",
"name": "Sticky Note3",
"type": "n8n-nodes-base.stickyNote",
"position": [
-704,
96
],
"parameters": {
"width": 160,
"height": 112,
"content": "Analyzes competitor offers and identifies threats to your program"
},
"typeVersion": 1
},
{
"id": "d4b6d5b3-f3f1-442e-8789-3894d4e9b30e",
"name": "Sticky Note4",
"type": "n8n-nodes-base.stickyNote",
"position": [
-480,
112
],
"parameters": {
"width": 160,
"height": 96,
"content": "Separates critical threats from routine competitive intelligence\n"
},
"typeVersion": 1
},
{
"id": "58925f96-eff2-4e33-9944-926998e3ce32",
"name": "Sticky Note5",
"type": "n8n-nodes-base.stickyNote",
"position": [
-256,
-224
],
"parameters": {
"width": 160,
"height": 96,
"content": "Immediate alert for critical competitive threats needing action\n"
},
"typeVersion": 1
},
{
"id": "56f697ff-864c-4ab8-8fb7-e0c1bbe37b7f",
"name": "Sticky Note6",
"type": "n8n-nodes-base.stickyNote",
"position": [
-416,
432
],
"parameters": {
"width": 160,
"height": 80,
"content": "Maintains historical record for trend analysis over time\n"
},
"typeVersion": 1
},
{
"id": "92ae294d-6fa9-4d8a-89ac-68b47829cfca",
"name": "Sticky Note7",
"type": "n8n-nodes-base.stickyNote",
"position": [
-32,
-96
],
"parameters": {
"width": 160,
"height": 112,
"content": "Records all competitive intelligence to centralized tracking sheet\n"
},
"typeVersion": 1
},
{
"id": "19deffee-57e4-4620-aa63-ba21d512dfb3",
"name": "Sticky Note8",
"type": "n8n-nodes-base.stickyNote",
"position": [
-240,
96
],
"parameters": {
"width": 160,
"height": 112,
"content": "Creates detailed competitive intelligence reports for email distribution\n"
},
"typeVersion": 1
},
{
"id": "3ebb136f-3b88-4802-9881-a90a838aa4f4",
"name": "Sticky Note9",
"type": "n8n-nodes-base.stickyNote",
"position": [
-32,
400
],
"parameters": {
"width": 160,
"height": 128,
"content": "Sends comprehensive competitive analysis reports to affiliate management team"
},
"typeVersion": 1
},
{
"id": "87a2d559-c25e-4805-9dd5-21610455e1e3",
"name": "Sticky Note10",
"type": "n8n-nodes-base.stickyNote",
"position": [
-416,
624
],
"parameters": {
"width": 160,
"height": 96,
"content": "Regular updates for medium/low threats requiring ongoing monitoring\n"
},
"typeVersion": 1
},
{
"id": "7b74ac47-dde6-4568-a675-560cfc39f4bc",
"name": "Sticky Note11",
"type": "n8n-nodes-base.stickyNote",
"position": [
208,
0
],
"parameters": {
"width": 160,
"height": 112,
"content": "Aggregates competitive intelligence into market position summary metrics\n"
},
"typeVersion": 1
}
],
"connections": {
"AI Offer Analysis": {
"main": [
[
{
"node": "Route by Threat Level",
"type": "main",
"index": 0
}
]
]
},
"Email Affiliate Team": {
"main": [
[
{
"node": "Calculate Market Position",
"type": "main",
"index": 0
}
]
]
},
"Route by Threat Level": {
"main": [
[
{
"node": "Log to Competitor Dashboard",
"type": "main",
"index": 0
},
{
"node": "Archive All Data",
"type": "main",
"index": 0
},
{
"node": "URGENT: Competitive Threat Alert",
"type": "main",
"index": 0
},
{
"node": "Generate Strategic Report",
"type": "main",
"index": 0
}
],
[
{
"node": "Log to Competitor Dashboard",
"type": "main",
"index": 0
},
{
"node": "Archive All Data",
"type": "main",
"index": 0
},
{
"node": "Routine Monitoring Alert",
"type": "main",
"index": 0
},
{
"node": "Generate Strategic Report",
"type": "main",
"index": 0
}
]
]
},
"Scrape Competitor Sites": {
"main": [
[
{
"node": "AI Offer Analysis",
"type": "main",
"index": 0
}
]
]
},
"Generate Strategic Report": {
"main": [
[
{
"node": "Email Affiliate Team",
"type": "main",
"index": 0
}
]
]
},
"Schedule Competitor Check": {
"main": [
[
{
"node": "Scrape Competitor Sites",
"type": "main",
"index": 0
}
]
]
},
"Log to Competitor Dashboard": {
"main": [
[
{
"node": "Calculate Market Position",
"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 automatically monitors competitor affiliate programs twice daily using Bright Data's web scraping API to extract commission rates, cookie durations, average order values, and payout terms from competitor websites. The AI analysis engine scores each competitor…
Source: https://n8n.io/workflows/10176/ — 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 contains community nodes that are only compatible with the self-hosted version of n8n.
Simplify financial oversight with this automated n8n workflow. Triggered daily, it fetches cash flow and expense data from a Google Sheet, analyzes inflows and outflows, validates records, and generat
Automate your payroll process with this efficient workflow. Triggered monthly on the 28th, it fetches employee data from a Google Sheet, uses AI to calculate net salaries with tax and deductions, stru
Use cases are many: send recurring market updates to investors, distribute new listings context to buyers, or push periodic area snapshots to your client base — all without touching it manually after
Automated garden and farm irrigation system that uses weather forecasts and evapotranspiration calculations to determine optimal watering schedules, preventing water waste while maintaining healthy pl