{
  "name": "Email outreach drafter based on HubSpot data",
  "nodes": [
    {
      "id": "5eb22f9c-dfae-495f-9bf4-027f92670bc5",
      "name": "Contact Ref",
      "type": "n8n-nodes-base.noOp",
      "position": [
        960,
        480
      ]
    },
    {
      "id": "d1a1b59f-b746-40ef-846f-c596564a2538",
      "name": "Get All Customer's Emails",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1456,
        480
      ]
    },
    {
      "id": "22c3f6bb-9344-4319-9eeb-4b2d3232aee3",
      "name": "Create Draft Email for Review",
      "type": "n8n-nodes-base.gmail",
      "position": [
        3024,
        624
      ]
    },
    {
      "id": "d77dac1f-5f9c-45de-b4f3-3a0c076c67b6",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -384,
        128
      ],
      "parameters": {
        "width": 544,
        "height": 632,
        "content": "## Email Outreach Drafter with HubSpot context\n\n### How it works\n1. Click **Test workflow** to start.\n2. **HubSpot:** fetch contacts (e.g., decision makers).\n3. **Gmail:** pull each contact’s recent e"
      }
    },
    {
      "id": "c20148a9-b8f6-4e24-9522-1df4e72842b2",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2832,
        448
      ],
      "parameters": {
        "width": 464,
        "height": 376,
        "content": "## 5. Create a draft in gmail \nSave the AI-written pitch as a draft in Gmail. Skim, tweak, send, and save hours! "
      }
    },
    {
      "id": "12677fce-489c-4e08-b7fc-558533542de6",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        2256,
        336
      ],
      "parameters": {
        "width": 560,
        "height": 444,
        "content": "## 4. Creat a sales email draft using the persona\nFeed the persona to AI and have it draft a tailored pitch that matches the customer’s beliefs, priorities, and communication style."
      }
    },
    {
      "id": "d5f35beb-ac07-4f6e-96ed-ce9395e38aee",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1696,
        336
      ],
      "parameters": {
        "width": 540,
        "height": 444,
        "content": "## 3. Build person from the emails\nFor each prospect, use AI to create a simple persona based on emails. Use the **Information Extractor** node to tell the LLM which traits to pull (eg: role, goals, p"
      }
    },
    {
      "id": "c8c9b8c7-1c38-4142-b2fa-d5f0e69e2a5e",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1152,
        336
      ],
      "parameters": {
        "width": 520,
        "height": 372,
        "content": "## 2. Get previous email threads"
      }
    },
    {
      "id": "75f939f6-954a-413f-93ed-267ade013491",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        512,
        336
      ],
      "parameters": {
        "width": 608,
        "height": 372,
        "content": "## 1. Get target customers in Hubspot\n"
      }
    },
    {
      "id": "6aae27da-13ce-4535-9e80-b7ff190595ee",
      "name": "For Each Contact",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        752,
        464
      ]
    },
    {
      "id": "e091dea6-9880-48fd-a7ca-7b4fadce66ce",
      "name": "Get Contacts",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        560,
        464
      ]
    },
    {
      "id": "3dc19bf4-167e-46fe-b483-53e752fe0ad2",
      "name": "Analyse and Build Persona",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1808,
        480
      ]
    },
    {
      "id": "a692062b-c142-47de-997e-10ae6c5420ee",
      "name": "Generate Sales Email",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        2416,
        480
      ]
    },
    {
      "id": "5b325d06-e4e9-4a50-a260-ce733d57f007",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        2496,
        640
      ]
    },
    {
      "id": "b6cb19c3-db32-4c56-8a61-8eac39c7cae0",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1888,
        640
      ]
    },
    {
      "id": "018a8972-546c-43cc-986a-b72fa9d0d4d9",
      "name": "Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        1248,
        480
      ]
    },
    {
      "id": "d8dab6ac-acfe-452f-921d-55d27060ed6a",
      "name": "When clicking 'Execute workflow'",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        304,
        464
      ]
    }
  ],
  "connections": {
    "Variables": {
      "main": [
        [
          {
            "node": "Get All Customer's Emails",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Contact Ref": {
      "main": [
        [
          {
            "node": "Variables",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Contacts": {
      "main": [
        [
          {
            "node": "For Each Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "For Each Contact": {
      "main": [
        [],
        [
          {
            "node": "Contact Ref",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Sales Email": {
      "main": [
        [
          {
            "node": "Create Draft Email for Review",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Analyse and Build Persona",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Analyse and Build Persona": {
      "main": [
        [
          {
            "node": "Generate Sales Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get All Customer's Emails": {
      "main": [
        [
          {
            "node": "Analyse and Build Persona",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Gemini Chat Model1": {
      "ai_languageModel": [
        [
          {
            "node": "Generate Sales Email",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Create Draft Email for Review": {
      "main": [
        [
          {
            "node": "For Each Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking 'Execute workflow'": {
      "main": [
        [
          {
            "node": "Get Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}