{
  "name": "Send AI website audits with GPT-4.1 and Gmail as a lead magnet",
  "nodes": [
    {
      "id": "df8d781a-3c33-4f9f-adb0-a245c980e4e2",
      "name": "Form Trigger",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -672,
        272
      ]
    },
    {
      "id": "6f5aa717-c655-4228-95cc-ba0d4815c254",
      "name": "OpenAI – Analyst Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        48,
        480
      ]
    },
    {
      "id": "abbcf3e0-195b-449a-95e3-5f235cb5cf90",
      "name": "Analyst Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        320,
        480
      ]
    },
    {
      "id": "68c41d3b-921f-4df5-a1de-682d8da7e919",
      "name": "Writer Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        832,
        480
      ]
    },
    {
      "id": "30df5820-1436-432f-a53f-b32c1f1b5e06",
      "name": "Analyst Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        112,
        272
      ]
    },
    {
      "id": "ea22a01b-6ad2-4c2e-b59a-a16d88277397",
      "name": "Writer Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        656,
        272
      ]
    },
    {
      "id": "b050b9f3-db41-43a8-8178-350a68af86ae",
      "name": "OpenAI – Writer Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        576,
        464
      ]
    },
    {
      "id": "667a3e94-1274-4de1-88c8-c4ad41910db9",
      "name": "Send Email",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1664,
        272
      ]
    },
    {
      "id": "31b4b7f1-fcf3-4ca1-867a-4ed6cb81465a",
      "name": "Build Email HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        1216,
        272
      ]
    },
    {
      "id": "94878d17-f8a3-4e03-8023-373ec6fb9d1b",
      "name": "Clean HTML",
      "type": "n8n-nodes-base.code",
      "position": [
        -208,
        272
      ]
    },
    {
      "id": "95e76890-12ed-4d20-9b3b-a9c2f11819f3",
      "name": "Fetch Website HTML",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -384,
        272
      ]
    },
    {
      "id": "5d21af29-a432-4a18-a09b-441e8f6772cf",
      "name": "Sticky – Overview",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        -256
      ],
      "parameters": {
        "width": 520,
        "height": 200,
        "content": "## 🤖 AI Business Analysis – Lead Magnet\n**What this workflow does:**\nA prospect fills in a form with their email and website URL. The workflow fetches their website, analyses it with AI, writes a pers"
      }
    },
    {
      "id": "51802a2b-9bd9-4c7d-afbf-41e942d2fa61",
      "name": "Sticky – Form",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -752,
        -16
      ],
      "parameters": {
        "width": 280,
        "height": 450,
        "content": "## 📝 Step 1 – Form Trigger\nA simple n8n form with two fields:\n- **Email** → where the report is sent\n- **Website URL** → the site to be analysed\n\n💡 You can embed this form on your landing page or shar"
      }
    },
    {
      "id": "49c426d0-0315-4e4f-a47c-62d86cf788c1",
      "name": "Sticky – Fetch & Clean",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -432,
        -16
      ],
      "parameters": {
        "width": 364,
        "height": 454,
        "content": "## 🌐 Step 2 – Fetch & Clean Website\n**Fetch Website HTML:** Makes an HTTP GET request to the submitted URL and retrieves the raw HTML.\n\n**Clean HTML:** Strips all tags, scripts and styles, leaving onl"
      }
    },
    {
      "id": "bc3f43f0-4633-48df-91a3-f55c95965426",
      "name": "Sticky – Analyst Agent",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -32,
        -16
      ],
      "parameters": {
        "width": 508,
        "height": 644,
        "content": "## 🔍 Step 3 – Analyst Agent\nReads the plain-text website content and returns a **structured JSON diagnostic** with:\n- Business type, offers & target audience\n- Contact channels & conversion funnels\n- "
      }
    },
    {
      "id": "a33a6e21-c0f3-45e3-af34-1a2c86550fa1",
      "name": "Sticky – Writer Agent",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        -16
      ],
      "parameters": {
        "width": 460,
        "height": 644,
        "content": "## ✍️ Step 4 – Writer Agent\nTakes the analyst's JSON and writes a **personalised email** with:\n- A genuine opening compliment based on the site analysis\n- 10 numbered improvements in prose (benefit-fo"
      }
    },
    {
      "id": "4b85d9f6-10b2-4865-a3cf-155e802202b1",
      "name": "Sticky – Build HTML",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1008,
        -16
      ],
      "parameters": {
        "width": 524,
        "height": 632,
        "content": "## 🎨 Step 5 – Build Email HTML\nConverts the writer's plain message into a **branded HTML email** with:\n- Gradient header with your logo\n- Numbered improvement cards with brand colours\n- CTA button lin"
      }
    },
    {
      "id": "bb607496-5c83-4a67-909a-d878c5a8222e",
      "name": "Sticky – Send Email",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1568,
        -16
      ],
      "parameters": {
        "width": 280,
        "height": 630,
        "content": "## 📧 Step 6 – Send Email\nSends the branded HTML report via **Gmail** to the address submitted in the form.\n\n🔑 **Setup required:**\n1. Connect your Gmail account under Credentials\n2. Update `senderName`"
      }
    }
  ],
  "connections": {
    "Clean HTML": {
      "main": [
        [
          {
            "node": "Analyst Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Form Trigger": {
      "main": [
        [
          {
            "node": "Fetch Website HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Writer Agent": {
      "main": [
        [
          {
            "node": "Build Email HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Analyst Agent": {
      "main": [
        [
          {
            "node": "Writer Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Email HTML": {
      "main": [
        [
          {
            "node": "Send Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Website HTML": {
      "main": [
        [
          {
            "node": "Clean HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Writer Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Writer Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Analyst Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Analyst Agent",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI – Writer Model": {
      "ai_languageModel": [
        [
          {
            "node": "Writer Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI – Analyst Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyst Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    }
  }
}