{
  "name": "Website Scraper with Apify",
  "nodes": [
    {
      "parameters": {
        "amount": 300,
        "unit": "seconds"
      },
      "name": "Wait",
      "type": "n8n-nodes-base.wait",
      "typeVersion": 1,
      "position": [
        0,
        -300
      ],
      "id": "b313014a-80cf-4271-a872-1ee595f4c339",
      "webhookId": "95790835-8d8b-4d2f-a6d5-ea5b92819254"
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "=Scraped Results:\n\n{{ $json.url }}\n\n{{ $json.metadata.title }}\n\n{{ $json.metadata.description }}\n\n{{ $json.text }}",
        "options": {
          "systemMessage": "Act as a lead generation assistant and sales strategist.\n\nFrom the scraped website content below, write a short summary about the company that includes:\n\n- Who they are and what they do\n- What services or products they offer\n- What niche or industry they serve\n- Where they’re located (if available)\n- Key decision-maker signals (team mentions, titles, etc.)\n- Any tech stack or platforms they use (e.g., Shopify, WordPress, Calendly)\n- Signs of growth or hiring (careers page, open roles)\n- Client names, case studies, or testimonials\n\nThen, based on what you’ve found, suggest 1–2 practical ways a salesperson could approach this company. Focus on how to add value, automate something, or solve a pain point you inferred.\n\nWrite the whole response in a natural tone, like you're briefing a salesperson.\n\nIf something’s missing, skip it — don’t call attention to gaps.\n"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 1.8,
      "position": [
        -140,
        -60
      ],
      "id": "4691ee96-33f1-475c-89dd-fdf8ccceb9bb",
      "name": "AI Agent"
    },
    {
      "parameters": {
        "model": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        -140,
        120
      ],
      "id": "e491b2ab-0d0f-4450-bfde-1f558f9354c3",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "MzIepidaRw9ZqcPB",
          "name": "OpenAi account Credentials"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.chatTrigger",
      "typeVersion": 1.1,
      "position": [
        -380,
        -300
      ],
      "id": "567cf9ca-88b0-4c9f-bf09-cfe00c5e72bc",
      "name": "When chat message received",
      "webhookId": "c0784ce7-340f-4d09-a9b3-dd6e4cfa2ecb"
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apify.com/v2/acts/apify~website-content-crawler/runs",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "sendBody": true,
        "specifyBody": "json",
        "jsonBody": "={\n    \"aggressivePrune\": false,\n    \"clickElementsCssSelector\": \"[aria-expanded=\\\"false\\\"]\",\n    \"clientSideMinChangePercentage\": 15,\n    \"crawlerType\": \"playwright:adaptive\",\n    \"debugLog\": false,\n    \"debugMode\": false,\n    \"expandIframes\": true,\n    \"ignoreCanonicalUrl\": false,\n    \"keepUrlFragments\": false,\n    \"maxCrawlDepth\": 0,\n    \"maxCrawlPages\": 1,\n    \"proxyConfiguration\": {\n        \"useApifyProxy\": true\n    },\n    \"readableTextCharThreshold\": 100,\n    \"removeCookieWarnings\": true,\n    \"removeElementsCssSelector\": \"nav, footer, script, style, noscript, svg, img[src^='data:'],\\n[role=\\\"alert\\\"],\\n[role=\\\"banner\\\"],\\n[role=\\\"dialog\\\"],\\n[role=\\\"alertdialog\\\"],\\n[role=\\\"region\\\"][aria-label*=\\\"skip\\\" i],\\n[aria-modal=\\\"true\\\"]\",\n    \"renderingTypeDetectionPercentage\": 10,\n    \"respectRobotsTxtFile\": false,\n    \"saveFiles\": false,\n    \"saveHtml\": false,\n    \"saveHtmlAsFile\": false,\n    \"saveMarkdown\": true,\n    \"saveScreenshots\": false,\n    \"startUrls\": [\n        {\n            \"url\": \"{{ $json.chatInput }}\",\n            \"method\": \"GET\"\n        }\n    ],\n    \"useSitemaps\": false\n}",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -180,
        -300
      ],
      "id": "f11cad1d-a9fc-4344-ac54-82292efa9be4",
      "name": "Scrape Website (APIFY)",
      "credentials": {
        "httpBasicAuth": {
          "id": "O0OOt4m5Ck2YFP46",
          "name": "Apify API"
        },
        "httpHeaderAuth": {
          "id": "nCVw9Gdz7a5BEsks",
          "name": "APIFY Token"
        }
      }
    },
    {
      "parameters": {
        "url": "={{ \"https://api.apify.com/v2/datasets/\" + $json.data.defaultDatasetId + \"/items\" }}",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth",
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -340,
        -60
      ],
      "id": "0ddbfa6a-3b5b-4063-a02e-dc9d4ee0ba8c",
      "name": "Get Scraped Data",
      "credentials": {
        "httpHeaderAuth": {
          "id": "nCVw9Gdz7a5BEsks",
          "name": "APIFY Token"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Wait": {
      "main": [
        [
          {
            "node": "Get Scraped Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "When chat message received": {
      "main": [
        [
          {
            "node": "Scrape Website (APIFY)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Website (APIFY)": {
      "main": [
        [
          {
            "node": "Wait",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Scraped Data": {
      "main": [
        [
          {
            "node": "AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "3339b777-1ae5-421d-b19d-fb364b9c8b3f",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "4aabc0aa2e160dafa4f9d9bcedde563b5af29598cd16960f637ae2fb99aea720"
  },
  "id": "yKuiWArYW20n4Jbp",
  "tags": []
}