{
  "id": "qDoihlcvYfyAieir",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Generate Cold Email from LinkedIn Profile with Dumpling AI and GPT-4",
  "tags": [],
  "nodes": [
    {
      "id": "7de66b30-526f-4eb1-ac77-5cae046911ae",
      "name": "Trigger on LinkedIn Profile Submission",
      "type": "n8n-nodes-base.formTrigger",
      "position": [
        -480,
        32
      ],
      "parameters": {
        "options": {},
        "formTitle": "Linkedin profile",
        "formFields": {
          "values": [
            {
              "fieldLabel": "profile URL"
            }
          ]
        }
      },
      "typeVersion": 2.2
    },
    {
      "id": "debcc3e2-04b5-4525-a45b-abea748d86bb",
      "name": "Extract Company Info (Dumpling AI)",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        -272,
        32
      ],
      "parameters": {
        "url": "https://app.dumplingai.com/api/v1/linkedin/company",
        "method": "POST",
        "options": {},
        "jsonBody": "={\n  \"url\":\"{{ $json['profile URL'] }}\"\n} ",
        "sendBody": true,
        "specifyBody": "json",
        "authentication": "genericCredentialType",
        "genericAuthType": "httpHeaderAuth"
      },
      "credentials": {
        "httpHeaderAuth": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "3679ae6f-f0f9-4210-9d54-599693845002",
      "name": "Enrich Contact (Dropcontact)",
      "type": "n8n-nodes-base.dropcontact",
      "position": [
        -64,
        32
      ],
      "parameters": {
        "options": {
          "waitTime": 60
        },
        "additionalFields": {
          "country": "={{ $json.location.country }}",
          "website": "={{ $json.website }}",
          "linkedin": "={{ $json.url }}",
          "full_name": "={{ $json.name }}"
        }
      },
      "credentials": {
        "dropcontactApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "12334649-93b9-488a-ac12-48054e5821e0",
      "name": "Generate Cold Email (GPT-4)",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        144,
        32
      ],
      "parameters": {
        "modelId": {
          "__rl": true,
          "mode": "list",
          "value": "gpt-4.1",
          "cachedResultName": "GPT-4.1"
        },
        "options": {},
        "messages": {
          "values": [
            {
              "role": "system",
              "content": "=You are an expert cold email copywriter for a digital marketing agency called BrightPath Digital.\nYour task is to take the lead details provided and generate two things:\n1. A personalized subject line that feels relevant to them and sparks curiosity, no longer than eight words.\n2. A short cold email of four to six sentences in HTML that starts with a natural ice breaker about them or their company, introduces BrightPath Digital\u2019s services, highlights how we help businesses grow through increased visibility and qualified leads and better campaign performance, and ends with a light call to action. The email must always end with the signature block shown below.\n\nGuidelines:\nUse the lead\u2019s name in the greeting.\nConnect the ice breaker directly to the company description so it feels tailored.\nKeep the tone professional, warm, and human.\nAvoid buzzwords and robotic phrases.\nWrite in clear simple English.\nKeep the total email under one hundred and twenty words.\nAlways include this exact signature block at the end of the HTML:\n<p>Best regards,<br>BrightPath Digital</p>\n\n\nOutput must be strict JSON with no extra text. Return exactly this structure:\n{\n  \"subject\": \"Personalized subject line here\",\n  \"email\": \"<p>Greeting that uses the lead\u2019s name.</p><p>Ice breaker tied to the company description.</p><p>Brief introduction of BrightPath Digital and how we help.</p><p>Simple call to action asking for a quick chat.</p><p>Best regards,<br>BrightPath Digital</p>\"\n}\n"
            },
            {
              "content": "=Input fields you will receive:  \n- Name: {{ $json.full_name }}\n- Company Description: {{ $('Extract Company Info (Dumpling AI)').item.json.description }}"
            }
          ]
        },
        "jsonOutput": true
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1.8
    },
    {
      "id": "45f9c532-3991-41e7-bf8a-6613e8399580",
      "name": "Send Cold Email via Gmail",
      "type": "n8n-nodes-base.gmail",
      "position": [
        496,
        32
      ],
      "parameters": {
        "sendTo": "=example@gmail.com",
        "message": "={{ $json.message.content.email }}",
        "options": {
          "appendAttribution": false
        },
        "subject": "={{ $json.message.content.subject }}"
      },
      "credentials": {
        "gmailOAuth2": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "db20873e-d1b8-4823-b33c-1160aaa9442e",
      "name": "Log Lead to Airtable",
      "type": "n8n-nodes-base.airtable",
      "position": [
        704,
        32
      ],
      "parameters": {
        "base": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://airtable.com/apppDyB7Z8ON9zzXu",
          "cachedResultName": "LinkedIn leads "
        },
        "table": {
          "__rl": true,
          "mode": "list",
          "value": "",
          "cachedResultUrl": "https://airtable.com/apppDyB7Z8ON9zzXu/tblhKKHU9zXnpWjs1",
          "cachedResultName": "leads"
        },
        "columns": {
          "value": {
            "Name": "={{ $('Extract Company Info (Dumpling AI)').item.json.name }}",
            "People": "={{ $('Extract Company Info (Dumpling AI)').item.json.employeeCount }}",
            "website": "={{ $('Extract Company Info (Dumpling AI)').item.json.website }}",
            "LinkedIn Company URL": "={{ $('Extract Company Info (Dumpling AI)').item.json.url }}"
          },
          "schema": [
            {
              "id": "Name",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Name",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "LinkedIn Company URL",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "LinkedIn Company URL",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "People",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "People",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "website",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "website",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            },
            {
              "id": "Company Analysis",
              "type": "string",
              "display": true,
              "removed": false,
              "readOnly": false,
              "required": false,
              "displayName": "Company Analysis",
              "defaultMatch": false,
              "canBeUsedToMatch": true
            }
          ],
          "mappingMode": "defineBelow",
          "matchingColumns": [],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {},
        "operation": "create"
      },
      "credentials": {
        "airtableTokenApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "24303ff7-9cd6-496b-865c-f59cde103ce9",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -496,
        -304
      ],
      "parameters": {
        "width": 624,
        "height": 464,
        "content": "## \u2709\ufe0f Generate and Send Cold Email from LinkedIn Profile with AI\n\nThis workflow turns a submitted LinkedIn profile into a cold email in seconds.\n\n1. Trigger: LinkedIn URL submitted via web form  \n2. Dumpling AI fetches company data  \n3. Dropcontact enriches with name/email  \n4. GPT-4 writes a cold email and subject line  \n5. Gmail sends the email  \n6. Airtable logs the lead\n\n\u2705 Required: Dumpling AI, Dropcontact, OpenAI, Gmail, Airtable credentials  \n\u2705 Outputs are structured and ready-to-use\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "75bcf111-8da1-4a09-8720-f172678b1c29",
  "connections": {
    "Send Cold Email via Gmail": {
      "main": [
        [
          {
            "node": "Log Lead to Airtable",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Cold Email (GPT-4)": {
      "main": [
        [
          {
            "node": "Send Cold Email via Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich Contact (Dropcontact)": {
      "main": [
        [
          {
            "node": "Generate Cold Email (GPT-4)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Company Info (Dumpling AI)": {
      "main": [
        [
          {
            "node": "Enrich Contact (Dropcontact)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Trigger on LinkedIn Profile Submission": {
      "main": [
        [
          {
            "node": "Extract Company Info (Dumpling AI)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}