{
  "name": "Automate new customer onboarding with HubSpot, Google Calendar, and AI-powered Gmail",
  "nodes": [
    {
      "id": "b9256d00-9dff-432a-a678-e71a4074b26c",
      "name": "Webhook",
      "type": "n8n-nodes-base.webhook",
      "position": [
        -20,
        -160
      ]
    },
    {
      "id": "2726dd28-5366-4c0e-ad16-bae6dc2cbc0b",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        -200
      ],
      "parameters": {
        "width": 320,
        "height": 440,
        "content": "## What does it do?\nObjective:\n\nStreamline the onboarding process for new customers, ensuring they receive all necessary resources and support.\nTrigger: Set a webhook trigger or a CRM trigger (like Hu"
      }
    },
    {
      "id": "680bdd4e-f382-4d20-8197-a7d65454ce36",
      "name": "Try Again",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        500
      ]
    },
    {
      "id": "1ab48997-7533-4572-86d5-980af557d09d",
      "name": "Success",
      "type": "n8n-nodes-base.set",
      "position": [
        1000,
        300
      ]
    },
    {
      "id": "4cb493a1-1eff-42ca-9c51-8f070fe3e9ba",
      "name": "Calendar Agent",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        412,
        400
      ]
    },
    {
      "id": "8c088b37-1005-4bc4-bdf5-0558ccb0c873",
      "name": "Create Event with Attendee",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        320,
        620
      ]
    },
    {
      "id": "91a0e49a-888f-4511-94e7-e0166ce7dd58",
      "name": "Create Event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        440,
        620
      ]
    },
    {
      "id": "8cfb90e5-6108-4003-b048-271650d4bc6c",
      "name": "Get Events",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        560,
        620
      ]
    },
    {
      "id": "c5cc3550-7d9a-43c9-8434-e1ab78f7f596",
      "name": "Delete Event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        680,
        620
      ]
    },
    {
      "id": "7ce45da8-dc24-4634-9f48-3864165885cd",
      "name": "Update Event",
      "type": "n8n-nodes-base.googleCalendarTool",
      "position": [
        800,
        620
      ]
    },
    {
      "id": "b46f24a4-719c-414e-94d9-ecfb1e7dfe39",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        200,
        400
      ]
    },
    {
      "id": "aedbe138-ed51-4300-881b-6b58928f5bb4",
      "name": "OpenAI Chat Model2",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        1520,
        160
      ]
    },
    {
      "id": "a540ae6b-e1ee-4d91-988e-e60bae743377",
      "name": "calendarAgent",
      "type": "@n8n/n8n-nodes-langchain.toolWorkflow",
      "position": [
        1640,
        160
      ]
    },
    {
      "id": "64979b9f-a29a-4c53-b87a-cec84e7ba1fe",
      "name": "Structured Output Parser",
      "type": "@n8n/n8n-nodes-langchain.outputParserStructured",
      "position": [
        1760,
        160
      ]
    },
    {
      "id": "359d7296-a8e9-494c-b519-cca62c0805df",
      "name": "Get list of owners",
      "type": "n8n-nodes-base.httpRequest",
      "position": [
        420,
        -60
      ]
    },
    {
      "id": "e8aab719-a5d9-4168-9c68-eea32c7d3ef4",
      "name": "Split Out owners",
      "type": "n8n-nodes-base.splitOut",
      "position": [
        640,
        -60
      ]
    },
    {
      "id": "5e44ea67-e2f9-4cea-a030-c452b8bb482f",
      "name": "Get current owner",
      "type": "n8n-nodes-base.filter",
      "position": [
        860,
        -60
      ]
    },
    {
      "id": "c03bd58c-7a42-4966-96e8-45928f745475",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -540,
        -200
      ],
      "parameters": {
        "width": 680,
        "height": 1340,
        "content": "## How to Set a Webhook in n8n and HubSpot\n\n## 1. Set Up a Webhook in n8n\n\n### Step 1: Create a New Workflow\n- Go to your **n8n dashboard**.\n- Click on **\"New Workflow.\"**\n\n### Step 2: Add the Webhook"
      }
    },
    {
      "id": "3861fa49-909d-4591-a1b8-d7bdd20e6560",
      "name": "HubSpot Trigger",
      "type": "n8n-nodes-base.hubspotTrigger",
      "position": [
        -20,
        40
      ]
    },
    {
      "id": "9051cc3d-06be-4238-998e-7cb938313d24",
      "name": "Enter your company data here",
      "type": "n8n-nodes-base.set",
      "position": [
        200,
        -60
      ]
    },
    {
      "id": "5260ec73-0733-47d1-af03-66ead128820e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        -200
      ],
      "parameters": {
        "width": 400,
        "height": 320,
        "content": "## Set your data and your company's \nThe sender_email you set here has to be the same as the one you use in hubspot "
      }
    },
    {
      "id": "78e301c7-3146-4bd9-9546-9f8c5b46cac7",
      "name": "If a contact is created",
      "type": "n8n-nodes-base.if",
      "position": [
        1080,
        -60
      ]
    },
    {
      "id": "b575fed7-da03-412d-aa00-fcf0edc85ae2",
      "name": "Get all info about the contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        1300,
        -60
      ]
    },
    {
      "id": "956a02eb-970b-49bd-b1a5-3eebf7acb852",
      "name": "Write a personalized message",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        1552,
        -60
      ]
    },
    {
      "id": "6d392f67-5940-43ed-ac8d-d27f8dab91ed",
      "name": "Send the message",
      "type": "n8n-nodes-base.gmail",
      "position": [
        2180,
        -60
      ]
    },
    {
      "id": "1928e760-4ca1-443c-9de0-211b3c3c88b8",
      "name": "Set owner to contact",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        2400,
        -60
      ]
    },
    {
      "id": "727e52cc-ba62-4f1e-b7b3-c8cd17ef1f42",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        160,
        220
      ],
      "parameters": {
        "width": 1080,
        "height": 560,
        "content": "## Calendar tool\nThis part has been borrowed from the excellent [Nate Herk](https://www.youtube.com/@nateherk) youtube channel"
      }
    },
    {
      "id": "e605ec3f-ecbe-47c7-a46b-d20ded665c55",
      "name": "Transforms markdown to HTML",
      "type": "n8n-nodes-base.markdown",
      "position": [
        1960,
        -60
      ]
    },
    {
      "id": "ac43422a-3642-424c-a95a-902652705dbc",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1460,
        -220
      ],
      "parameters": {
        "width": 440,
        "height": 540,
        "content": "## Email writer\n- This agent writes a personalized Email\n- Uses the calendar Agent tool to create an appointmenton an empty slot.\nFeel free to personalize the prompt"
      }
    },
    {
      "id": "c0e5511a-a84f-4603-9c23-3d5266f761c1",
      "name": "OpenAI Model",
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "position": [
        200,
        620
      ]
    },
    {
      "id": "c195ad96-7b04-4b01-a3a5-cb0df3c5cb26",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -880,
        260
      ],
      "parameters": {
        "width": 320,
        "height": 260,
        "content": "## Contact me\n- If you need any modification to this workflow\n- if you need some help with this workflow\n- Or if you need any workflow in n8n, Make, or Langchain / Langgraph\n\nWrite to me: [thomas@poll"
      }
    }
  ],
  "connections": {
    "Webhook": {
      "main": [
        [
          {
            "node": "Enter your company data here",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Events": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Create Event": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Delete Event": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Model": {
      "ai_languageModel": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Update Event": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "calendarAgent": {
      "ai_tool": [
        [
          {
            "node": "Write a personalized message",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Calendar Agent": {
      "main": [
        [
          {
            "node": "Success",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Try Again",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "HubSpot Trigger": {
      "main": [
        [
          {
            "node": "Enter your company data here",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send the message": {
      "main": [
        [
          {
            "node": "Set owner to contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Split Out owners": {
      "main": [
        [
          {
            "node": "Get current owner",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get current owner": {
      "main": [
        [
          {
            "node": "If a contact is created",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get list of owners": {
      "main": [
        [
          {
            "node": "Split Out owners",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "OpenAI Chat Model2": {
      "ai_languageModel": [
        [
          {
            "node": "Write a personalized message",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "If a contact is created": {
      "main": [
        [
          {
            "node": "Get all info about the contact",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Structured Output Parser": {
      "ai_outputParser": [
        [
          {
            "node": "Write a personalized message",
            "type": "ai_outputParser",
            "index": 0
          }
        ]
      ]
    },
    "Create Event with Attendee": {
      "ai_tool": [
        [
          {
            "node": "Calendar Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Transforms markdown to HTML": {
      "main": [
        [
          {
            "node": "Send the message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Enter your company data here": {
      "main": [
        [
          {
            "node": "Get list of owners",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Write a personalized message": {
      "main": [
        [
          {
            "node": "Transforms markdown to HTML",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get all info about the contact": {
      "main": [
        [
          {
            "node": "Write a personalized message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Calendar Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}