{
  "nodes": [
    {
      "id": "b9256d00-9dff-432a-a678-e71a4074b26c",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -20,
        -160
      ],
      "parameters": {
        "path": "kundenonboarding",
        "options": {},
        "httpMethod": "POST"
      },
      "typeVersion": 2
    },
    {
      "id": "2726dd28-5366-4c0e-ad16-bae6dc2cbc0b",
      "name": "Get all info about the contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1300,
        -60
      ],
      "parameters": {
        "contactId": {
          "__rl": true,
          "mode": "id",
          "value": "={{ $json.body.objectId }}"
        },
        "operation": "get",
        "authentication": "oAuth2",
        "additionalFields": {}
      },
      "typeVersion": 2.1
    },
    {
      "id": "91a0e49a-888f-4511-94e7-e0166ce7dd58",
      "name": "Write a personalized message",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1552,
        -60
      ],
      "parameters": {
        "text": "=Your task is to write a personalized Welcome email to a recipient. Use the 'Recipient email' as an attendee.",
        "options": {
          "systemMessage": "You are a professional Customer Success Manager."
        },
        "promptType": "define",
        "hasOutputParser": true
      },
      "typeVersion": 1.9
    },
    {
      "id": "c5cc3550-7d9a-43c9-8434-e1ab78f7f596",
      "name": "Send the message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2180,
        -60
      ],
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "message": "={{ $json.output.body }}",
        "subject": "Herzlich Willkommen bei {{ $json.company_name }}!"
      },
      "typeVersion": 2.1
    },
    {
      "id": "1928e760-4ca1-443c-9de0-211b3c3c88b8",
      "name": "Set owner to contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        2400,
        -60
      ],
      "parameters": {
        "email": "={{ $json.email }}",
        "options": {},
        "authentication": "oAuth2",
        "additionalFields": {
          "contactOwner": "={{ $('Get current owner').item.json.id }}"
        }
      },
      "typeVersion": 2.1
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Get all info about the contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all info about the contact": {
      "main": [
        [
          {
            "node": "Write a personalized message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write a personalized message": {
      "main": [
        [
          {
            "node": "Send the message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Set owner to contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}