AutomationFlowsWeb Scraping › Automated Competitor Deal Monitoring with AI Segmentation & Personalized…

Automated Competitor Deal Monitoring with AI Segmentation & Personalized…

Original n8n title: Automated Competitor Deal Monitoring with AI Segmentation & Personalized Email Marketing

Byvinci-king-01 @vinci-king-01 on n8n.io

Transform your business with intelligent deal monitoring and automated customer engagement! This AI-powered coupon aggregator continuously tracks competitor deals and creates personalized marketing campaigns that convert. 24/7 Deal Monitoring - Automatically scans competitor…

Cron / scheduled trigger★★★★☆ complexity14 nodesHTTP Request
Web Scraping Trigger: Cron / scheduled Nodes: 14 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #6975 — we link there as the canonical source.

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 →

Download .json
{
  "id": "WvrxIu1q3XWWkbdc",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "My workflow 3",
  "tags": [
    {
      "id": "IZ3TCbPLnlWJhHZq",
      "name": "Amazon Intelligence",
      "createdAt": "2025-08-04T14:47:06.250Z",
      "updatedAt": "2025-08-04T14:47:06.250Z"
    }
  ],
  "nodes": [
    {
      "id": "132eecf6-60ed-4ed8-b03f-bbbe6953d7ab",
      "name": "Workflow Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        384,
        -512
      ],
      "parameters": {
        "width": 400,
        "height": 336,
        "content": "\ud83c\udfaf **DEAL INTELLIGENCE & MARKETING AUTOMATION**\n\nThis workflow automatically:\n\u2022 Monitors competitor deals daily\n\u2022 Segments customers intelligently  \n\u2022 Generates personalized offers\n\u2022 Creates targeted email campaigns\n\u2022 Provides analytics & insights\n\n\u23f0 Runs every day at 8 AM\n\ud83d\udce7 Sends daily reports to management"
      },
      "typeVersion": 1
    },
    {
      "id": "a2c2a600-ce18-4e32-be65-712efd6ad9e5",
      "name": "Daily Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        432,
        -96
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "cronExpression",
              "expression": "0 8 * * *"
            }
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "993aac58-cd3e-4721-80d1-b6fa96df976f",
      "name": "Data Collection Setup",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        784,
        -512
      ],
      "parameters": {
        "width": 280,
        "height": 344,
        "content": "\ud83d\udd0d **DATA COLLECTION**\n\n\u26a0\ufe0f SETUP REQUIRED:\n\u2022 Replace URL with your target deal site\n\u2022 Add authentication if needed\n\u2022 Consider rate limiting\n\u2022 Set appropriate timeout\n\n\ud83d\udca1 TIP: Use multiple sources for better coverage"
      },
      "typeVersion": 1
    },
    {
      "id": "6463dcab-4fd9-474d-a245-2e62a5c957e7",
      "name": "Fetch Deal Data",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        640,
        -96
      ],
      "parameters": {
        "url": "https://www.retailmenot.com/coupons/electronics",
        "options": {
          "timeout": 30000
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "df3fdb3f-9749-4ea2-90e0-6d4c4ab88288",
      "name": "Analyze Deals",
      "type": "n8n-nodes-base.code",
      "position": [
        832,
        -96
      ],
      "parameters": {
        "jsCode": "// Deal Analysis Engine\nconst dealData = $input.first().json;\n\nfunction analyzeDealData() {\n  // Simulated deal analysis since scraping might fail\n  const mockDeals = [\n    { store: 'Amazon', discount: 30, category: 'electronics', title: 'Echo Dot Sale' },\n    { store: 'Best Buy', discount: 25, category: 'electronics', title: 'Laptop Deals' },\n    { store: 'Target', discount: 40, category: 'home', title: 'Home Decor Sale' },\n    { store: 'Walmart', discount: 20, category: 'general', title: 'Weekly Specials' }\n  ];\n\n  const analysis = {\n    summary: {\n      total_deals: mockDeals.length,\n      average_discount: Math.round(mockDeals.reduce((sum, deal) => sum + deal.discount, 0) / mockDeals.length),\n      top_categories: ['electronics', 'home', 'general'],\n      analyzed_at: new Date().toISOString()\n    },\n    competitive_intelligence: {\n      threat_level: mockDeals.some(d => d.discount > 35) ? 'High' : 'Medium',\n      top_discounts: mockDeals.sort((a, b) => b.discount - a.discount).slice(0, 3),\n      market_activity: 'Active'\n    },\n    urgent_deals: mockDeals.filter(d => d.discount >= 30)\n  };\n\n  return analysis;\n}\n\nconst result = analyzeDealData();\nreturn [{ json: result }];"
      },
      "typeVersion": 2
    },
    {
      "id": "7f254e0e-3156-467a-900f-79a5731cc2ce",
      "name": "Segment Customers",
      "type": "n8n-nodes-base.code",
      "position": [
        1040,
        -96
      ],
      "parameters": {
        "jsCode": "// Customer Segmentation\nconst dealAnalysis = $input.first().json;\n\nfunction segmentCustomers() {\n  // Simulated customer database\n  const customers = [\n    { id: 'C001', name: 'John Smith', email: 'user@example.com', value: 2500, segment: 'vip' },\n    { id: 'C002', name: 'Sarah Johnson', email: 'user@example.com', value: 450, segment: 'bargain_hunter' },\n    { id: 'C003', name: 'Mike Wilson', email: 'user@example.com', value: 1200, segment: 'at_risk' },\n    { id: 'C004', name: 'Emma Davis', email: 'user@example.com', value: 180, segment: 'new_prospect' }\n  ];\n\n  const segments = {\n    vip_customers: customers.filter(c => c.segment === 'vip'),\n    bargain_hunters: customers.filter(c => c.segment === 'bargain_hunter'),\n    at_risk: customers.filter(c => c.segment === 'at_risk'),\n    new_prospects: customers.filter(c => c.segment === 'new_prospect')\n  };\n\n  return {\n    segments,\n    total_customers: customers.length,\n    segmentation_date: new Date().toISOString()\n  };\n}\n\nconst segmentation = segmentCustomers();\nreturn [{ json: segmentation }];"
      },
      "typeVersion": 2
    },
    {
      "id": "72b9f5bf-701b-4cee-84c4-368a1564d266",
      "name": "Intelligence Processing",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1056,
        -512
      ],
      "parameters": {
        "width": 300,
        "height": 332,
        "content": "\ud83e\udde0 **INTELLIGENCE PROCESSING**\n\nDeals are analyzed for:\n\u2022 Average discount rates\n\u2022 Competitive threat levels\n\u2022 Category performance\n\u2022 Market activity patterns\n\nCustomers are segmented into:\n\u2022 VIP customers (high value)\n\u2022 Bargain hunters (price sensitive)\n\u2022 At-risk (need retention)\n\u2022 New prospects (acquisition)"
      },
      "typeVersion": 1
    },
    {
      "id": "832b51e7-1d72-463a-b41c-e8f4a0b1605e",
      "name": "Generate Personalized Offers",
      "type": "n8n-nodes-base.code",
      "position": [
        1232,
        -96
      ],
      "parameters": {
        "jsCode": "// Generate Personalized Offers\nconst dealAnalysis = $input.item(0).json;\nconst customerSegments = $input.item(1).json;\n\nfunction generateOffers(deals, segments) {\n  const avgDiscount = deals.summary.average_discount;\n  const threatLevel = deals.competitive_intelligence.threat_level;\n  \n  const offers = {\n    campaign_batches: [],\n    offer_summary: {\n      total_campaigns: 0,\n      projected_revenue: 0,\n      generated_at: new Date().toISOString()\n    }\n  };\n\n  // Generate offers for each segment\n  Object.keys(segments.segments).forEach(segmentName => {\n    const segmentCustomers = segments.segments[segmentName];\n    if (segmentCustomers.length === 0) return;\n\n    let discountLevel;\n    let priority;\n    \n    switch(segmentName) {\n      case 'vip_customers':\n        discountLevel = Math.max(15, avgDiscount - 5);\n        priority = 'Medium';\n        break;\n      case 'bargain_hunters':\n        discountLevel = Math.max(avgDiscount + 5, 35);\n        priority = threatLevel === 'High' ? 'Critical' : 'High';\n        break;\n      case 'at_risk':\n        discountLevel = Math.max(avgDiscount + 10, 40);\n        priority = 'Critical';\n        break;\n      case 'new_prospects':\n        discountLevel = Math.max(20, avgDiscount);\n        priority = 'Low';\n        break;\n      default:\n        discountLevel = avgDiscount;\n        priority = 'Medium';\n    }\n\n    const batch = {\n      segment: segmentName,\n      customer_count: segmentCustomers.length,\n      discount_percentage: discountLevel,\n      priority: priority,\n      estimated_revenue: segmentCustomers.length * 75, // $75 average per customer\n      customers: segmentCustomers.map(customer => ({\n        id: customer.id,\n        email: customer.email,\n        name: customer.name,\n        discount_code: `DEAL${Math.random().toString(36).substr(2, 6).toUpperCase()}`,\n        personalized_discount: discountLevel\n      }))\n    };\n\n    offers.campaign_batches.push(batch);\n  });\n\n  offers.offer_summary.total_campaigns = offers.campaign_batches.length;\n  offers.offer_summary.projected_revenue = offers.campaign_batches.reduce(\n    (sum, batch) => sum + batch.estimated_revenue, 0\n  );\n\n  return offers;\n}\n\nconst personalizedOffers = generateOffers(dealAnalysis, customerSegments);\nreturn [{ json: personalizedOffers }];"
      },
      "typeVersion": 2
    },
    {
      "id": "e4406cd2-d562-4763-8d00-d144c19a0224",
      "name": "Create Email Campaigns",
      "type": "n8n-nodes-base.code",
      "position": [
        1440,
        -96
      ],
      "parameters": {
        "jsCode": "// Email Campaign Generator\nconst offers = $input.first().json;\n\nfunction createEmailCampaigns(offerData) {\n  const campaigns = [];\n  \n  offerData.campaign_batches.forEach(batch => {\n    batch.customers.forEach(customer => {\n      const emailContent = {\n        to: customer.email,\n        subject: getSubjectLine(batch.segment, customer.personalized_discount),\n        campaign_id: `CAMP_${batch.segment.toUpperCase()}_${Date.now()}`,\n        customer_name: customer.name,\n        discount_code: customer.discount_code,\n        discount_percentage: customer.personalized_discount,\n        priority: batch.priority,\n        template: getEmailTemplate(batch.segment)\n      };\n      \n      campaigns.push(emailContent);\n    });\n  });\n\n  return {\n    email_campaigns: campaigns,\n    summary: {\n      total_emails: campaigns.length,\n      high_priority: campaigns.filter(c => c.priority === 'Critical').length,\n      projected_revenue: offerData.offer_summary.projected_revenue,\n      created_at: new Date().toISOString()\n    }\n  };\n}\n\nfunction getSubjectLine(segment, discount) {\n  const subjects = {\n    'vip_customers': `Exclusive ${discount}% Off - VIP Access Only`,\n    'bargain_hunters': `Flash Sale: ${discount}% Off Everything!`,\n    'at_risk': `We Miss You! ${discount}% Off to Come Back`,\n    'new_prospects': `Welcome! ${discount}% Off Your First Order`\n  };\n  return subjects[segment] || `Special ${discount}% Discount Just for You`;\n}\n\nfunction getEmailTemplate(segment) {\n  const templates = {\n    'vip_customers': 'elegant_gold_template',\n    'bargain_hunters': 'urgent_red_template',\n    'at_risk': 'warm_comeback_template',\n    'new_prospects': 'welcome_blue_template'\n  };\n  return templates[segment] || 'default_template';\n}\n\nconst emailCampaigns = createEmailCampaigns(offers);\nreturn [{ json: emailCampaigns }];"
      },
      "typeVersion": 2
    },
    {
      "id": "c2b6338b-4cbd-4d7c-b9e3-dcca918e0640",
      "name": "Campaign Generation",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1360,
        -512
      ],
      "parameters": {
        "width": 300,
        "height": 332,
        "content": "\ud83d\udce7 **CAMPAIGN GENERATION**\n\nPersonalized offers based on:\n\u2022 Market threat level\n\u2022 Customer segment value\n\u2022 Historical behavior\n\u2022 Competitive pricing\n\nEmail campaigns include:\n\u2022 Dynamic subject lines\n\u2022 Unique discount codes\n\u2022 Segment-specific templates\n\u2022 Priority-based scheduling"
      },
      "typeVersion": 1
    },
    {
      "id": "786942ab-42c2-4ed5-b101-81209bdb0525",
      "name": "Generate Analytics Report",
      "type": "n8n-nodes-base.code",
      "position": [
        1632,
        -96
      ],
      "parameters": {
        "jsCode": "// Analytics Dashboard\nconst dealAnalysis = $input.item(0).json;\nconst customerSegments = $input.item(1).json;\nconst offers = $input.item(2).json;\nconst emailCampaigns = $input.item(3).json;\n\nfunction generateReport(deals, segments, offerData, campaigns) {\n  const report = {\n    executive_summary: {\n      date: new Date().toISOString().split('T')[0],\n      total_deals_analyzed: deals.summary.total_deals,\n      average_market_discount: deals.summary.average_discount,\n      threat_level: deals.competitive_intelligence.threat_level,\n      customers_targeted: segments.total_customers,\n      campaigns_created: campaigns.summary.total_emails,\n      projected_revenue: campaigns.summary.projected_revenue\n    },\n    key_insights: [\n      `Market average discount: ${deals.summary.average_discount}%`,\n      `Competitive threat level: ${deals.competitive_intelligence.threat_level}`,\n      `${segments.total_customers} customers across ${Object.keys(segments.segments).length} segments`,\n      `${campaigns.summary.high_priority} high-priority campaigns scheduled`\n    ],\n    immediate_actions: [],\n    segment_performance: {},\n    next_execution: new Date(Date.now() + 24*60*60*1000).toISOString()\n  };\n\n  // Generate immediate actions based on threat level\n  if (deals.competitive_intelligence.threat_level === 'High') {\n    report.immediate_actions.push('Deploy aggressive counter-pricing strategy');\n    report.immediate_actions.push('Increase email send frequency');\n  }\n\n  // Segment performance breakdown\n  offerData.campaign_batches.forEach(batch => {\n    report.segment_performance[batch.segment] = {\n      customers: batch.customer_count,\n      discount_offered: batch.discount_percentage + '%',\n      priority: batch.priority,\n      estimated_revenue: batch.estimated_revenue\n    };\n  });\n\n  return report;\n}\n\nconst analyticsReport = generateReport(dealAnalysis, customerSegments, offers, emailCampaigns);\nreturn [{ json: analyticsReport }];"
      },
      "typeVersion": 2
    },
    {
      "id": "4927d96d-2da5-4ead-aaf9-c3e334e5097f",
      "name": "Send Daily Report",
      "type": "n8n-nodes-base.httpRequest",
      "disabled": true,
      "position": [
        1840,
        -96
      ],
      "parameters": {
        "url": "https://api.sendgrid.com/v3/mail/send",
        "method": "POST",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "authentication": "genericCredentialType",
        "bodyParameters": {
          "parameters": [
            {
              "name": "personalizations",
              "value": "=[{ \"to\": [{ \"email\": \"manager@company.com\" }], \"subject\": \"Daily Deal Intelligence Report\" }]"
            },
            {
              "name": "from",
              "value": "={ \"email\": \"noreply@yourcompany.com\", \"name\": \"Deal Intelligence System\" }"
            },
            {
              "name": "content",
              "value": "=[{ \"type\": \"text/html\", \"value\": `<h2>Daily Deal Intelligence Report</h2><p>Market Threat Level: <strong>${$json.executive_summary.threat_level}</strong></p><p>Campaigns Created: <strong>${$json.executive_summary.campaigns_created}</strong></p><p>Projected Revenue: <strong>$${$json.executive_summary.projected_revenue}</strong></p>` }]"
            }
          ]
        },
        "genericAuthType": "httpHeaderAuth",
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.1
    },
    {
      "id": "08755947-82c6-4031-a316-aa702fa1ce2d",
      "name": "Analytics & Reporting",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1664,
        -512
      ],
      "parameters": {
        "width": 280,
        "height": 328,
        "content": "\ud83d\udcca **ANALYTICS & REPORTING**\n\nDaily reports include:\n\u2022 Executive summary\n\u2022 Key market insights\n\u2022 Segment performance\n\u2022 Revenue projections\n\u2022 Immediate action items\n\n\ud83d\udca1 Perfect for daily standup meetings and strategic planning!"
      },
      "typeVersion": 1
    },
    {
      "id": "f5b2262b-a391-4e6b-9ec3-1278087db280",
      "name": "Email Configuration",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1936,
        -512
      ],
      "parameters": {
        "width": 280,
        "height": 328,
        "content": "\u2699\ufe0f **EMAIL SETUP REQUIRED**\n\n\ud83d\udd27 TO ACTIVATE:\n1. Enable this node (currently disabled)\n2. Set up SendGrid credentials\n3. Update recipient email\n4. Test email delivery\n\n\u26a0\ufe0f Node is disabled by default for safety"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "636eafc1-e538-49df-bad6-0f5ba335d428",
  "connections": {
    "Analyze Deals": {
      "main": [
        [
          {
            "node": "Segment Customers",
            "type": "main",
            "index": 0
          },
          {
            "node": "Generate Analytics Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Trigger": {
      "main": [
        [
          {
            "node": "Fetch Deal Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Deal Data": {
      "main": [
        [
          {
            "node": "Analyze Deals",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Analytics Report": {
      "main": [
        [
          {
            "node": "Send Daily Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Personalized Offers": {
      "main": [
        [
          {
            "node": "Create Email Campaigns",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

Transform your business with intelligent deal monitoring and automated customer engagement! This AI-powered coupon aggregator continuously tracks competitor deals and creates personalized marketing campaigns that convert. 24/7 Deal Monitoring - Automatically scans competitor…

Source: https://n8n.io/workflows/6975/ — original creator credit. Request a take-down →

More Web Scraping workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Web Scraping

Proactively alert to service endpoint changes and pod/container issues (Pending, Not Ready, Restart spikes) using Prometheus metrics, formatted and sent to Slack.

HTTP Request
Web Scraping

Tired of being let down by the Google Drive Trigger? Rather not exhaust system resources by polling every minute? Then this workflow is for you!

HTTP Request, Execute Workflow Trigger
Web Scraping

Triggers at a regular interval or via a webhook request. Solves AWS WAF challenge then makes a request to fetch the product page. Extracts product data from the retrieved HTML page. Compares the curre

N8N Nodes Capsolver, HTTP Request
Web Scraping

Automatically monitor billable Kimai projects every weekday morning and receive a formatted HTML email when a project deadline is approaching or its hour budget is running low. If nothing requires att

Email Send, HTTP Request
Web Scraping

SLA Monitoring Workflow. Uses httpRequest. Scheduled trigger; 10 nodes.

HTTP Request