{
  "id": "FQ3d3ucbw3NXgnUo",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "AI Icebreaker Builder: Scrape Sites with Dumpling AI and Save to Airtable",
  "tags": [],
  "nodes": [
    {
      "id": "40c158ab-6e9c-4296-873c-c879714b65a6",
      "name": "No Operation, do nothing",
      "type": "n8n-nodes-base.noOp",
      "position": [
        100,
        -140
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "d63720a5-9785-45d1-a8ba-a9c961031095",
      "name": "Run Daily to Process New Leads",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -560,
        60
      ],
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "typeVersion": 1.2
    },
    {
      "id": "e5804c37-2a8d-4574-852a-f885c6941e31",
      "name": "Search Cold Leads Without Icebreaker",
      "type": "n8n-nodes-base.airtable",
      "position": [
        -340,
        60
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://airtable.com/appPSvSKdA6075xJC",
          "cachedResultName": "Testing n8n"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://airtable.com/appPSvSKdA6075xJC/tbl1KgkRF2EEMc2Fq",
          "cachedResultName": "cold leads"
        },
        "options": {},
        "operation": "search",
        "filterByFormula": "{Ice breaker} = ''"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "839fd20b-5a5d-4419-85b0-9b82223c8b95",
      "name": "Loop Through Each Lead",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -120,
        60
      ],
      "parameters": {
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "78b197e2-6028-49a0-9100-5cc44838a9cd",
      "name": "Wait Before Making Request",
      "type": "n8n-nodes-base.wait",
      "position": [
        100,
        60
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "de96d330-006b-4410-8b75-83c3b9658045",
      "name": "Scrape Lead Website with Dumpling AI",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        320,
        60
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/scrape",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"url\": \"{{ $json.Website }}\"\n}\n",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "5d5675b6-4245-4562-a9d2-7cf54fe20b75",
      "name": "Generate Icebreaker, Summary & Email (GPT-4o)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        540,
        60
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "chatgpt-4o-latest",
          "cachedResultName": "CHATGPT-4O-LATEST"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are a smart assistant helping write personalized outreach. Below is content scraped from a lead\u2019s website, along with the lead\u2019s name.\n\nUsing this, please generate the following:\n\nIcebreaker: A short, friendly opening line that shows we took time to look at their business.\n\nEmail Body: A short cold outreach email that introduces what we do and how we can help, referencing their business or needs where relevant.\n\nWebsite Summary: A short summary (2 or 3 lines) of what their website is about, written in plain English.\n\nPlease return your response in this JSON format:\n\n{\n  \"icebreaker\": \"string\",\n  \"email_body\": \"string\",\n  \"website_summary\": \"string\"\n}"
            },
            {
              "content": "=Lead Name: {{ $('Search Cold Leads Without Icebreaker').item.json.Name }}\nScraped Website Content:{{ $json.content }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "05a2b673-8e2a-41cf-9a01-eb19b2e584ea",
      "name": "Save AI Output Back to Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        960,
        60
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://airtable.com/appPSvSKdA6075xJC",
          "cachedResultName": "Testing n8n"
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://airtable.com/appPSvSKdA6075xJC/tbl1KgkRF2EEMc2Fq",
          "cachedResultName": "cold leads"
        },
        "columns": {
          "value": {
            "id": "={{ $('Search Cold Leads Without Icebreaker').item.json.id }}",
            "Name": "={{ $('Search Cold Leads Without Icebreaker').item.json.Name }}",
            "Phone": "={{ $('Search Cold Leads Without Icebreaker').item.json.Phone }}",
            "Website": "={{ $('Search Cold Leads Without Icebreaker').item.json.Website }}",
            "Email body": "={{ $json.message.content.email_body }}",
            "Ice breaker": "={{ $json.message.content.icebreaker }}",
            "website summary": "={{ $json.message.content.website_summary }}"
          },
          "schema": [
            {
              "id": "id",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": true,
              "required": false,
              "displayName": "id",
              "defaultMatch": true
            },
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Website",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Phone",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Phone",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Ice breaker",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Ice breaker",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website summary",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "website summary",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Email body",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Email body",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [
            "id"
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "update"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "cd8dac4b-6575-45fc-95fd-3052b244b0a2",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -640,
        -260
      ],
      "parameters": {
        "width": 810,
        "height": 480,
        "content": "### \ud83d\udd04 Automated Cold Email Writing from Lead Websites\n\nThis workflow runs on a schedule and pulls new cold leads from Airtable that have no \"Ice breaker\" yet. For each lead, it waits briefly to prevent API overuse, then sends the lead\u2019s website URL to Dumpling AI's scraping endpoint.\n\nThe scraped content is passed to GPT-4o to generate:\n- A personalized icebreaker\n- A website summary\n- A tailored cold email body\n\nFinally, all generated results are saved back into Airtable for each lead record.\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "710a2065-24ec-4681-aaa4-43028ec8acee",
  "connections": {
    "Loop Through Each Lead": {
      "main": [
        [
          {
            "node": "No Operation, do nothing",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Wait Before Making Request",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait Before Making Request": {
      "main": [
        [
          {
            "node": "Scrape Lead Website with Dumpling AI",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run Daily to Process New Leads": {
      "main": [
        [
          {
            "node": "Search Cold Leads Without Icebreaker",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Save AI Output Back to Airtable": {
      "main": [
        [
          {
            "node": "Loop Through Each Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Scrape Lead Website with Dumpling AI": {
      "main": [
        [
          {
            "node": "Generate Icebreaker, Summary & Email (GPT-4o)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Search Cold Leads Without Icebreaker": {
      "main": [
        [
          {
            "node": "Loop Through Each Lead",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Icebreaker, Summary & Email (GPT-4o)": {
      "main": [
        [
          {
            "node": "Save AI Output Back to Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}