{
  "schema_version": "1.0.0",
  "id": "calendly-booking-to-hubspot",
  "title": "Log a Calendly booking as a HubSpot meeting",
  "category": "lead-gen-crm",
  "difficulty": "beginner",
  "featured": false,
  "description": "Create or update the HubSpot contact for each Calendly invitee and log the meeting with their pre-call answers on the timeline.",
  "tags": [
    "booking",
    "calendly",
    "hubspot",
    "meetings"
  ],
  "apps": [
    "Calendly",
    "HubSpot"
  ],
  "plan": {
    "minimum": "Professional",
    "reasons": [
      "multi-step Zap: 2 steps after the trigger"
    ]
  },
  "tasks": {
    "typical": 2,
    "max": 2
  },
  "trigger": {
    "app": "Calendly",
    "event": "Invitee Created",
    "kind": "instant",
    "title": "New Calendly booking",
    "why": "Fires as soon as someone books any of your Calendly event types.",
    "config": {
      "Scope": "User"
    },
    "outputs": [
      "invitee_name",
      "invitee_first_name",
      "invitee_email",
      "invitee_phone",
      "event_type_name",
      "event_start_time",
      "event_end_time",
      "timezone",
      "cancel_url",
      "reschedule_url",
      "questions_and_answers"
    ],
    "sample": "sample-trigger.json"
  },
  "steps": [
    {
      "key": "contact",
      "kind": "action",
      "app": "HubSpot",
      "event": "Create or Update Contact",
      "title": "Create or update the contact",
      "why": "Ensures the person exists in HubSpot before the meeting is logged against them.",
      "fields": {
        "Email": "{{trigger.invitee_email}}",
        "First Name": "{{trigger.invitee_first_name}}",
        "Phone Number": "{{trigger.invitee_phone}}",
        "Lifecycle Stage": "lead"
      },
      "outputs": [
        "id",
        "is_new"
      ]
    },
    {
      "key": "meeting",
      "kind": "action",
      "app": "HubSpot",
      "event": "Create Engagement",
      "title": "Log the meeting on the timeline",
      "why": "A meeting engagement shows on the contact timeline with the time and the answers they gave when booking.",
      "fields": {
        "Engagement Type": "MEETING",
        "Associated Contact": "{{contact.id}}",
        "Title": "{{trigger.event_type_name}} with {{trigger.invitee_name}}",
        "Start Time": "{{trigger.event_start_time}}",
        "End Time": "{{trigger.event_end_time}}",
        "Body": "Booked via Calendly ({{trigger.timezone}}).\n{{trigger.questions_and_answers}}\nReschedule: {{trigger.reschedule_url}}"
      },
      "outputs": [
        "id"
      ]
    }
  ]
}
