Hubspot -> Get Contact
Action summary
Hubspot -> Get Contact
Function Documentation: HubSpot → Get Contact
Overview
This function retrieves a specific contact from HubSpot using the contact's ID. It involves setting environment variables, preparing the request, and handling the response from the HubSpot API.
Inputs
id (integer)
- Description: The unique identifier of the contact to be retrieved.
properties (text[])
- Description: A list of contact properties to retrieve.
Function Stack
1. HubSpot API Request
- API Request to
https://api.hubapi.com/crm/v3/objects/contacts/{id}
- Purpose: Sends a GET request to retrieve the specified contact from HubSpot.
2. Preconditions
- Precondition:
hubspot_api.response.status == 200
- Purpose: Ensures successful retrieval of the contact with HTTP status code 200.
Response
- The function returns the result from the HubSpot API response.
Success response
{
"id": "12345",
"properties": {
"company": "HubSpot",
"createdate": "2024-09-12T10:58:14.335Z",
"hs_object_id": "12345",
"lastmodifieddate": "2024-09-12T10:58:18.831Z"
},
"createdAt": "2024-09-12T10:58:14.335Z",
"updatedAt": "2024-09-12T10:58:18.831Z",
"archived": false
}
Error response
{
"message": "Uh oh! Hubspot returned with an error: Authentication credentials not found. This API supports OAuth 2.0 authentication and you can find more details at https://developers.hubspot.com/docs/methods/auth/oauth-overview"
}
Example
Input
{
"id": 123456,
"properties": [
"company"
]
}
Output
{
"id": "123456",
"properties": {
"company": "UC",
"createdate": "2024-09-23T13:30:40.386Z",
"hs_object_id": "60968500829",
"lastmodifieddate": "2024-09-23T13:31:43.044Z"
},
"createdAt": "2024-09-23T13:30:40.386Z",
"updatedAt": "2024-09-23T13:31:43.044Z",
"archived": false
}
Version notes
2024-10-07 19:14:51
Current