{
  "id": "[WORKFLOW_ID_REMOVED]",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "26 - Calendly Engagement Sync",
  "tags": [
    {
      "id": "[TAG_ID_REMOVED]",
      "name": "Dev",
      "createdAt": "2025-06-17T05:42:41.949Z",
      "updatedAt": "2025-06-17T05:42:41.949Z"
    }
  ],
  "nodes": [
    {
      "id": "33ec739f-e14d-4dbe-8709-8bd4c02571af",
      "name": "\ud83d\udcc5 Calendly Trigger",
      "type": "n8n-nodes-base.calendlyTrigger",
      "position": [
        -120,
        0
      ],
      "parameters": {
        "events": [
          "invitee.created"
        ]
      },
      "credentials": {
        "calendlyApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "69f79c21-f6cb-46d9-8730-ee6a60ab03d3",
      "name": "\ud83d\udd0d Search Contact (HubSpot)",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        100,
        0
      ],
      "parameters": {
        "operation": "search",
        "authentication": "appToken",
        "filterGroupsUi": {
          "filterGroupsValues": [
            {
              "filtersUi": {
                "filterValues": [
                  {
                    "value": "={{ $json.payload.email }}",
                    "propertyName": "email|string"
                  }
                ]
              }
            }
          ]
        },
        "additionalFields": {}
      },
      "credentials": {
        "hubspotAppToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1,
      "alwaysOutputData": true
    },
    {
      "id": "48c45f08-0dda-40e6-ba90-ab16cc609b52",
      "name": "\u2696\ufe0f Contact Exists?",
      "type": "n8n-nodes-base.if",
      "position": [
        320,
        0
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "version": 2,
            "leftValue": "",
            "caseSensitive": true,
            "typeValidation": "strict"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "99853056-346a-459d-8ee9-2d5fd22a2ff7",
              "operator": {
                "type": "string",
                "operation": "exists",
                "singleValue": true
              },
              "leftValue": "={{ $json.id }}",
              "rightValue": ""
            }
          ]
        }
      },
      "typeVersion": 2.2,
      "alwaysOutputData": true
    },
    {
      "id": "7ba3e4a4-e521-4326-8684-87ba8944bbe4",
      "name": "\ud83d\udcdd Log Meeting (Existing Contact)",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        620,
        -120
      ],
      "parameters": {
        "type": "meeting",
        "metadata": {
          "body": "=User Details: \n\n{{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.name }}\n{{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.email }}",
          "title": "=Calendly Meetings",
          "endTime": "={{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.scheduled_event.end_time }}",
          "startTime": "={{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.scheduled_event.start_time }}",
          "internalMeetingNotes": "={{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.questions_and_answers[0].answer }}"
        },
        "resource": "engagement",
        "authentication": "appToken",
        "additionalFields": {
          "associations": {
            "contactIds": "={{ $json.id }}"
          }
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "0c90c17a-ec8d-4ec1-8489-975fd8f60bc4",
      "name": "\u2795 Create Contact (HubSpot)",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        540,
        260
      ],
      "parameters": {
        "email": "={{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.email }}",
        "options": {},
        "authentication": "appToken",
        "additionalFields": {
          "firstName": "={{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.name }}"
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "77207279-dca3-4b5a-a8c0-659ace12889f",
      "name": "\ud83d\udcdd Log Meeting (New Contact)",
      "type": "n8n-nodes-base.hubspot",
      "position": [
        740,
        260
      ],
      "parameters": {
        "type": "meeting",
        "metadata": {
          "body": "=User Details: \n\n{{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.name }}\n{{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.email }}",
          "title": "=Calendly Meetings",
          "endTime": "={{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.scheduled_event.end_time }}",
          "startTime": "={{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.scheduled_event.start_time }}",
          "internalMeetingNotes": "={{ $('\ud83d\udcc5 Calendly Trigger').item.json.payload.questions_and_answers[0].answer }}"
        },
        "resource": "engagement",
        "authentication": "appToken",
        "additionalFields": {
          "associations": {
            "contactIds": "={{ $json.vid }}"
          }
        }
      },
      "credentials": {
        "hubspotAppToken": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "a74801e0-3b38-4c45-9b76-ada54d055085",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -280
      ],
      "parameters": {
        "width": 420,
        "height": 720,
        "content": "## \ud83d\udcc5 Calendly Trigger \u2192 \ud83d\udd0d Search Contact (HubSpot)\n\n*Captures event data whenever a new invitee books a Calendly meeting.\n\nExtracts key details: attendee's name, email, meeting start/end time, and answers to custom questions.\n\nSearches HubSpot for an existing contact using the invitee's email address.*"
      },
      "typeVersion": 1
    },
    {
      "id": "ef165c27-d80a-4a66-8e84-05133b742d6f",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        280,
        -280
      ],
      "parameters": {
        "color": 3,
        "width": 180,
        "height": 720,
        "content": "## \u2696\ufe0f Contact Exists?\n\n*Decision step to check if HubSpot returned a matching contact.*\n\n"
      },
      "typeVersion": 1
    },
    {
      "id": "fd3e8d69-1ea3-4b8a-8822-132ff6ff6b2e",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        -280
      ],
      "parameters": {
        "color": 4,
        "width": 460,
        "height": 340,
        "content": "## \ud83d\udcdd Log Meeting (Existing Contact)\n\n*If a contact is found, a HubSpot meeting engagement is created.\nIncludes:\nMeeting title (Calendly Meetings), Start and end time, Attendee details (name + email)*, Notes (custom question responses, if any)*"
      },
      "typeVersion": 1
    },
    {
      "id": "ffa20f7a-dff4-416b-9697-286fc0254306",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        480,
        80
      ],
      "parameters": {
        "width": 460,
        "height": 360,
        "content": "## \u2795 Create Contact (HubSpot) \u2192 \ud83d\udcdd Log Meeting (New Contact)\n\n*If no contact exists, a new one is created with name and email from Calendly, then the meeting is logged and linked to it.*"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "[VERSION_ID_REMOVED]",
  "connections": {
    "\ud83d\udcc5 Calendly Trigger": {
      "main": [
        [
          {
            "node": "\ud83d\udd0d Search Contact (HubSpot)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u2696\ufe0f Contact Exists?": {
      "main": [
        [
          {
            "node": "\ud83d\udcdd Log Meeting (Existing Contact)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "\u2795 Create Contact (HubSpot)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\u2795 Create Contact (HubSpot)": {
      "main": [
        [
          {
            "node": "\ud83d\udcdd Log Meeting (New Contact)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "\ud83d\udd0d Search Contact (HubSpot)": {
      "main": [
        [
          {
            "node": "\u2696\ufe0f Contact Exists?",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}