{
  "name": "Personalise outreach emails using customer data and AI",
  "nodes": [
    {
      "id": "93a8b03f-ff6b-4559-9cb1-9f439ff5e990",
      "name": "When clicking ‘Test workflow’",
      "type": "n8n-nodes-base.manualTrigger",
      "position": [
        -1180,
        0
      ]
    },
    {
      "id": "0aed449c-c60a-4309-91d2-4db9ed1f4ad2",
      "name": "Variables",
      "type": "n8n-nodes-base.set",
      "position": [
        -120,
        0
      ]
    },
    {
      "id": "f21c0147-dd18-4b06-9f58-258b8946977d",
      "name": "Google Gemini Chat Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        520,
        160
      ]
    },
    {
      "id": "27aaa070-4de5-479a-83eb-d2e0810a19da",
      "name": "Google Gemini Chat Model1",
      "type": "@n8n/n8n-nodes-langchain.lmChatGoogleGemini",
      "position": [
        1120,
        160
      ]
    },
    {
      "id": "b76ec237-3d90-4ed4-8746-36693775a39f",
      "name": "Create Draft Email For Review",
      "type": "n8n-nodes-base.gmail",
      "position": [
        1680,
        180
      ]
    },
    {
      "id": "7d62abe5-9278-45f2-ba07-aba0f4353a00",
      "name": "Generate Sales Email",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        1040,
        0
      ]
    },
    {
      "id": "71cd4b52-c3cd-413e-b495-f0ef511af9b1",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -220,
        -200
      ],
      "parameters": {
        "width": 520,
        "height": 420,
        "content": "## 2. Research Customer via Emails\nEmails can be a great source of research on how a customer or potential customer thinks, behaves and communicates. This template does require some interaction before"
      }
    },
    {
      "id": "f3cb9e8d-8d67-42a2-a9cd-7aae93a23816",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        320,
        -200
      ],
      "parameters": {
        "width": 540,
        "height": 540,
        "content": "## 3. Build Persona Outline from Research\nOnce we gather all the emails, we can use AI to analyse and construct a quick persona on our customer. Personas are useful to understand the customer's positi"
      }
    },
    {
      "id": "e0bdca91-e744-4717-ada6-5991e2d6c054",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        880,
        -200
      ],
      "parameters": {
        "width": 560,
        "height": 540,
        "content": "## 4. Generate Sales Pitch based on Persona\nUsing the persona, we can again ask AI to generate the perfect sales email which takes into consideration the customer's beliefs, values and communication s"
      }
    },
    {
      "id": "68be2c2c-5006-4041-b8ed-8c6b26d37251",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1480,
        -40
      ],
      "parameters": {
        "width": 480,
        "height": 440,
        "content": "## 5. Create Draft for Human Review\nFinally, an email draft is created to store the generated sales pitch for human review. If given, a list of customers to target, a SDR can ensure customised outreac"
      }
    },
    {
      "id": "893d42c3-c5fc-4cc3-acd2-5d847d4ebf1a",
      "name": "Analyse and Build Persona",
      "type": "@n8n/n8n-nodes-langchain.informationExtractor",
      "position": [
        440,
        0
      ]
    },
    {
      "id": "f27b7b8d-e9e8-445c-9209-25323bb40db4",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1400,
        -860
      ],
      "parameters": {
        "width": 480,
        "height": 1080,
        "content": "## Try it out\n### This n8n template uses existing emails from customers as context to customise and \"finetune\" outreach emails to them using AI.\n\nBy now, it should be common knowledge that we can leve"
      }
    },
    {
      "id": "72efcdea-3429-44e0-a29c-8ae0144783ae",
      "name": "Get All Customer's Correspondence",
      "type": "n8n-nodes-base.gmail",
      "position": [
        80,
        0
      ]
    },
    {
      "id": "e73c8a55-c85f-45a1-9735-1cea61caff3e",
      "name": "Get Contacts",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        -820,
        0
      ]
    },
    {
      "id": "3579a71d-ce1f-4175-9118-87997158dcb6",
      "name": "For Each Contact",
      "type": "n8n-nodes-base.splitInBatches",
      "position": [
        -620,
        0
      ]
    },
    {
      "id": "45679613-3114-4742-9e7a-700d8d29eff6",
      "name": "Contact Ref",
      "type": "n8n-nodes-base.noOp",
      "position": [
        -420,
        0
      ]
    },
    {
      "id": "18594bbd-efc5-4fbf-8693-ffcdfcfd900f",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -200
      ],
      "parameters": {
        "width": 640,
        "height": 420,
        "content": "## 1. Get Targeted Existing Customers\nAs with all campaigns, it's good to have a targeted subset of customers to aim for to assess the response. Here, we can pull them out of a CRM like Hubspot if gra"
      }
    }
  ],
  "connections": {
    "Variables": {
      "main": [
        [
          {
            "node": "Get All Customer's Correspondence",
            "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
          }
        ]
      ]
    },
    "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
          }
        ]
      ]
    },
    "Get All Customer's Correspondence": {
      "main": [
        [
          {
            "node": "Analyse and Build Persona",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When clicking ‘Test workflow’": {
      "main": [
        [
          {
            "node": "Get Contacts",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}