What the model is told
Create a new contact in HubSpot. Confirm the details with the customer first. Do not use this if the contact already exists (HubSpot returns a 409 if the email is already in use). Returns the new contact including its record id.
Request
POSThttps://api.hubapi.com/crm/v3/objects/contacts
Headers
Content-Typeapplication/jsonAuthorizationBearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN
Body
{
"properties": {
"email": "{{email}}",
"firstname": "{{firstName}}",
"lastname": "{{lastName}}",
"phone": "{{phone}}"
}
}Parameters
email stringThe contact's email address.firstName stringThe contact's first name.lastName stringThe contact's last name.phone stringThe contact's phone number.
Engage payload
{
"source": "VOICE_AI",
"tool": {
"id": "1ec854d2-f0c7-4202-8251-9e1df087e785",
"type": "HTTP_REQUEST",
"label": "Create HubSpot Contact",
"name": "create_hubspot_contact",
"customName": false,
"description": "Create a new contact in HubSpot. Confirm the details with the customer first. Do not use this if the contact already exists (HubSpot returns a 409 if the email is already in use). Returns the new contact including its record id.",
"parameters": [
{
"name": "email",
"type": "string",
"description": "The contact's email address."
},
{
"name": "firstName",
"type": "string",
"description": "The contact's first name."
},
{
"name": "lastName",
"type": "string",
"description": "The contact's last name."
},
{
"name": "phone",
"type": "string",
"description": "The contact's phone number."
}
],
"config": {
"endpoint": {
"method": "POST",
"url": "https://api.hubapi.com/crm/v3/objects/contacts"
},
"headers": [
{
"name": "Content-Type",
"value": "application/json"
},
{
"name": "Authorization",
"value": "Bearer YOUR_HUBSPOT_PRIVATE_APP_TOKEN"
}
],
"body": "{\n \"properties\": {\n \"email\": \"{{email}}\",\n \"firstname\": \"{{firstName}}\",\n \"lastname\": \"{{lastName}}\",\n \"phone\": \"{{phone}}\"\n }\n}",
"timeout": null
}
}
}IDs are regenerated on every copy.