HubSpot

Create HubSpot Ticket

Opens a support ticket linked to a contact.

Unverified

What the model is told

Create a support ticket in HubSpot for a customer. You need the contact's record ID, so use Find HubSpot Contact first. Confirm the subject and details with the customer. Returns the new ticket, including its ID.

Request

POSThttps://api.hubapi.com/crm/v3/objects/tickets

Headers

  • Content-Typeapplication/json
  • AuthorizationBearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN

Body

{
  "properties": {
    "subject": "{{subject}}",
    "content": "{{description}}",
    "hs_pipeline_stage": "YOUR_PIPELINE_STAGE_ID"
  },
  "associations": [
    {
      "to": {
        "id": "{{contactId}}"
      },
      "types": [
        {
          "associationCategory": "HUBSPOT_DEFINED",
          "associationTypeId": 16
        }
      ]
    }
  ]
}

Parameters

  • subject stringA short summary of the issue.
  • description stringThe detail of the issue as the customer described it.
  • contactId stringThe HubSpot record ID of the contact, from Find HubSpot Contact.

Engage payload

{
  "source": "VOICE_AI",
  "tool": {
    "id": "a44593e0-7226-48b9-85a4-c1c20054bfe3",
    "type": "HTTP_REQUEST",
    "label": "Create HubSpot Ticket",
    "name": "create_hubspot_ticket",
    "customName": false,
    "description": "Create a support ticket in HubSpot for a customer. You need the contact's record ID, so use Find HubSpot Contact first. Confirm the subject and details with the customer. Returns the new ticket, including its ID.",
    "parameters": [
      {
        "name": "subject",
        "type": "string",
        "description": "A short summary of the issue."
      },
      {
        "name": "description",
        "type": "string",
        "description": "The detail of the issue as the customer described it."
      },
      {
        "name": "contactId",
        "type": "string",
        "description": "The HubSpot record ID of the contact, from Find HubSpot Contact."
      }
    ],
    "config": {
      "endpoint": {
        "method": "POST",
        "url": "https://api.hubapi.com/crm/v3/objects/tickets"
      },
      "headers": [
        {
          "name": "Content-Type",
          "value": "application/json"
        },
        {
          "name": "Authorization",
          "value": "Bearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN"
        }
      ],
      "body": "{\n  \"properties\": {\n    \"subject\": \"{{subject}}\",\n    \"content\": \"{{description}}\",\n    \"hs_pipeline_stage\": \"YOUR_PIPELINE_STAGE_ID\"\n  },\n  \"associations\": [\n    {\n      \"to\": {\n        \"id\": \"{{contactId}}\"\n      },\n      \"types\": [\n        {\n          \"associationCategory\": \"HUBSPOT_DEFINED\",\n          \"associationTypeId\": 16\n        }\n      ]\n    }\n  ]\n}",
      "timeout": null
    }
  }
}

IDs are regenerated on every copy.