{
  "id": "4CnUOZExvXMQTGEB",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Website Summary",
  "tags": [],
  "nodes": [
    {
      "id": "6791eccd-206f-46db-b2a0-fd22eddcbaab",
      "name": "Manual Trigger",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -992,
        -80
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "de262216-3632-44fa-8095-51b2890a2bff",
      "name": "Shape output (Edit Fields)",
      "type": "n8n-nodes-base.set",
      "position": [
        272,
        -80
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "message",
              "name": "Personalized Message",
              "type": "string",
              "value": "={{ $json.message.content }}"
            }
          ]
        }
      },
      "typeVersion": 3.4
    },
    {
      "id": "13509a29-9641-4cb7-a100-322dbcf18efc",
      "name": "Wait 2s",
      "type": "n8n-nodes-base.wait",
      "position": [
        512,
        -16
      ],
      "parameters": {
        "unit": "seconds",
        "amount": 2
      },
      "typeVersion": 1
    },
    {
      "id": "14b1b895-6a33-4f82-8222-5375bbafbe89",
      "name": "Done",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -400,
        128
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "0aba365a-c78e-4746-b486-3d82247f3bde",
      "name": "Personalize Message",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -96,
        -80
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "content": "=You analyze an organization\u2019s website content here: {{ $json.data.markdown }}\n\nand produce concise, credible sales intelligence for pitching AI services.\n\nRequirements:\n- Be specific and grounded in the supplied content (title, meta, H1s, text snippet). Do not invent facts.\n- No buzzwords (avoid: leverage, synergies, cutting-edge, game-changing, etc.).\n- Tone: consultative, earnest, respectful; no hype; no exclamation points.\n- If a contact name is provided, greet or reference them by first name in the pitch once, naturally.\n- If content is thin, infer cautiously from title/meta/H1s and acknowledge limits.\n\nOutput format (plain text, exactly this structure):\nContext:\n\u2022 2\u20134 bullets on what they do, who they serve, and any pain/initiative AI could help with (explicit, concrete).\nPitch:\nOne paragraph (70\u2013110 words) proposing how AI/automation could help them, referencing 1\u20132 specifics from the site, ending with a single next-step question. "
            }
          ]
        }
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "f8c9563f-4095-43d6-af90-31ed79b2e57e",
      "name": "Update sheet with personalized message",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        704,
        176
      ],
      "parameters": {
        "columns": {
          "value": {
            "Personalized Message": "={{ $('Shape output (Edit Fields)').item.json['Personalized Message'] }}"
          },
          "schema": [
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Personalized Message",
              "type": "string",
              "display": true,
              "removed": false,
              "required": false,
              "displayName": "Personalized Message",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "Personalized Message"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16jci4CjnZdp32-ZWt2WjmspX9-xNtU5vEKzjVauZn04/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "16jci4CjnZdp32-ZWt2WjmspX9-xNtU5vEKzjVauZn04",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16jci4CjnZdp32-ZWt2WjmspX9-xNtU5vEKzjVauZn04/edit?usp=drivesdk",
          "cachedResultName": "Websites"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "5dd11818-b2ec-4d17-b3af-7c3640f10b4d",
      "name": "Fetch website URL from sheet",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -784,
        -80
      ],
      "parameters": {
        "options": {},
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": "gid=0",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16jci4CjnZdp32-ZWt2WjmspX9-xNtU5vEKzjVauZn04/edit#gid=0",
          "cachedResultName": "Sheet1"
        },
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": "16jci4CjnZdp32-ZWt2WjmspX9-xNtU5vEKzjVauZn04",
          "cachedResultUrl": "https://docs.google.com/spreadsheets/d/16jci4CjnZdp32-ZWt2WjmspX9-xNtU5vEKzjVauZn04/edit?usp=drivesdk",
          "cachedResultName": "Websites"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "a491869d-1446-40bf-b997-db77a5898534",
      "name": "Loop over URLs",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -512,
        -80
      ],
      "parameters": {
        "options": {},
        "batchSize": 1
      },
      "typeVersion": 2
    },
    {
      "id": "d0ee57fd-c057-4cfb-af2f-91d6fbb0fc74",
      "name": "Scrape website and get its content",
      "type": "@mendable/n8n-nodes-firecrawl.firecrawl",
      "position": [
        -288,
        -80
      ],
      "parameters": {
        "url": "={{ $json.Website }}",
        "operation": "scrape",
        "scrapeOptions": {
          "options": {
            "formats": [
              "markdown",
              "screenshot"
            ],
            "headers": {}
          }
        },
        "requestOptions": {}
      },
      "credentials": {
        "firecrawlApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "b8aed690-0f39-4886-a80a-4ad918a5c835",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -896,
        -400
      ],
      "parameters": {
        "width": 352,
        "height": 304,
        "content": "Upon being triggered, this first step is going to fetch all URLs from your spreadsheet. Each URL should be in a  new row.\n\nSpreadsheet setup:\n- column 1 = website\n- column 2 = personalized message\n\nPre-requisites:\n- Create your spreadsheet in your Google Drive with the appropriate columns\n- Add your Google credentials to n8n: "
      },
      "typeVersion": 1
    },
    {
      "id": "3c22c785-ac6c-4ec7-aa13-8d6e65474bfa",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -224,
        -416
      ],
      "parameters": {
        "color": 4,
        "width": 352,
        "height": 304,
        "content": "This is where the meat of things happens. The automation will loop over each website, using Firecrawl to perform the scrape. It will pass that content into your LLM (chatGPT in this case) to perform the personalization. Adjust the prompt as needed for your organization's context and what will be helpful for your personalized outreach\n\nPre-requisites:\n- Firecrawl account and API key\n- OpenAI credentials\n"
      },
      "typeVersion": 1
    },
    {
      "id": "59b808d0-d10f-4c96-9215-6da972cdb09c",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        640,
        384
      ],
      "parameters": {
        "color": 5,
        "width": 272,
        "height": 80,
        "content": "Your message will get mapped to the appropriate column in the spreadsheet"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "7a55ee84-18ab-4a3b-a18b-49c4aeff424e",
  "connections": {
    "Wait 2s": {
      "main": [
        [
          {
            "node": "Update sheet with personalized message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Loop over URLs": {
      "main": [
        [
          {
            "node": "Scrape website and get its content",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Done",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Manual Trigger": {
      "main": [
        [
          {
            "node": "Fetch website URL from sheet",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Personalize Message": {
      "main": [
        [
          {
            "node": "Shape output (Edit Fields)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Shape output (Edit Fields)": {
      "main": [
        [
          {
            "node": "Wait 2s",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch website URL from sheet": {
      "main": [
        [
          {
            "node": "Loop over URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape website and get its content": {
      "main": [
        [
          {
            "node": "Personalize Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Update sheet with personalized message": {
      "main": [
        [
          {
            "node": "Loop over URLs",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}