{
  "name": "Website Lead Enrichment to HubSpot",
  "nodes": [
    {
      "parameters": {
        "httpMethod": "POST",
        "path": "lead-intake",
        "responseMode": "lastNode",
        "options": {}
      },
      "id": "29025d74-7463-4491-8afc-84cbf661a42c",
      "name": "Webhook - Collect Lead",
      "type": "n8n-nodes-base.webhook",
      "typeVersion": 1,
      "position": [
        -440,
        100
      ],
      "webhookId": "749bbddb-0824-4164-9de6-ecf3827194f5"
    },
    {
      "parameters": {
        "sendTo": "={{ $('Webhook - Collect Lead').item.json.body.email }}",
        "subject": "Thanks for Getting in touch!",
        "emailType": "text",
        "message": "=Thank You for Reaching Out!\n\nDear {{ $json.body.first_name }}\n\nI hope this message finds you well. Thank you for reaching out to us at Forgent Systems. Your interest and support mean a lot to us.\n\nWe have received your request and our team will soon get back to you.\n\nThanks,\nForgent Systems Sales Team",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "fc4d1e0c-4337-458e-a7cb-4e3b8ec59926",
      "name": "Gmail - Send Thank You",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        -180,
        -80
      ],
      "webhookId": "dd81ab71-3957-4850-b3ae-e4d3fa8d173f",
      "credentials": {
        "gmailOAuth2": {
          "id": "BmKVNXwgdwaOPxRv",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "authentication": "appToken",
        "email": "={{ $('Webhook - Collect Lead').item.json.body.email }}",
        "additionalFields": {
          "city": "={{ $json.contacts[0].city }}",
          "companyName": "={{ $json.contacts[0].organization_name }}",
          "country": "={{ $json.contacts[0].country }}",
          "firstName": "={{ $('Webhook - Collect Lead').item.json.body.first_name }}",
          "jobTitle": "={{ $json.contacts[0].title }}",
          "message": "=Person LinkedIn: {{ $json.contacts[0].linkedin_url }}\nCompany Phone: {{ $json.contacts[0].account.primary_phone.number }}\nCompany LinkedIn: {{ $json.contacts[0].account.linkedin_url }}\n\n",
          "twitterUsername": "={{ $json.contacts[0].twitter_url }}",
          "websiteUrl": "={{ $json.contacts[0].account.website_url }}"
        },
        "options": {}
      },
      "id": "db05c2bb-87d0-4d3a-a7ff-4c694a4d4508",
      "name": "HubSpot - Create Contact",
      "type": "n8n-nodes-base.hubspot",
      "typeVersion": 2,
      "position": [
        40,
        100
      ],
      "credentials": {
        "hubspotAppToken": {
          "id": "GpW2eD3ZPpIfWIWe",
          "name": "HubSpot account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "your_email_address",
        "subject": "New Lead Notification",
        "emailType": "text",
        "message": "=A new form has been submitted on the website. \n\nName : {{ $('Webhook - Collect Lead').item.json.body.first_name }}\nEmail : {{ $json.body.email }}\n\n",
        "options": {
          "appendAttribution": false
        }
      },
      "id": "68fefbdd-f983-4e5f-83e7-19309521d138",
      "name": "Gmail - Notify Team",
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        -180,
        280
      ],
      "webhookId": "b89c9f7c-5e45-438d-938d-cc923760196b",
      "credentials": {
        "gmailOAuth2": {
          "id": "BmKVNXwgdwaOPxRv",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "method": "POST",
        "url": "https://api.apollo.io/api/v1/contacts/search",
        "sendQuery": true,
        "queryParameters": {
          "parameters": [
            {
              "name": "q_keywords",
              "value": "={{ $json.body.email }}"
            },
            {
              "name": "sort_ascending",
              "value": "false"
            }
          ]
        },
        "sendHeaders": true,
        "headerParameters": {
          "parameters": [
            {
              "name": "Cache-Control",
              "value": "no-cache"
            },
            {
              "name": "accept",
              "value": "application/json"
            },
            {
              "name": "x-api-key",
              "value": "your_apollo_key"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        -180,
        100
      ],
      "id": "e1a271c6-02a9-4f76-9986-bd51674c6c5f",
      "name": "Enrich Data from Apollo"
    }
  ],
  "pinData": {},
  "connections": {
    "Webhook - Collect Lead": {
      "main": [
        [
          {
            "node": "Gmail - Send Thank You",
            "type": "main",
            "index": 0
          },
          {
            "node": "Gmail - Notify Team",
            "type": "main",
            "index": 0
          },
          {
            "node": "Enrich Data from Apollo",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enrich Data from Apollo": {
      "main": [
        [
          {
            "node": "HubSpot - Create Contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "2f3efe37-c8ca-4fcc-90e6-8cda6456b85e",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f1c26778ec36097a9722a22c47c5e9c01f00b8862dadd0121ec118026a370fa6"
  },
  "id": "ymvuLviMFDbbNBw9"
}