Hubspot -> Get Deal
Action summary
Hubspot -> Get Deal
HubSpot → Get Deal
Overview
This function retrieves a specific deal from HubSpot using the deal's ID. It involves setting environment variables, preparing the request, and handling the response from the HubSpot API.
Inputs
hubspot_api_key (registry|text) Required Sensitive data
- Description: The API key for your HubSpot account.
deal_id (integer)
- Description: The unique identifier of the deal to be retrieved.
properties (text[])
- Description: A list of deal properties to retrieve.
properties_with_history (text[])
- Description: A list of deal properties with their history to retrieve.
Function Stack
1. HubSpot API Request
- API Request to
https://api.hubapi.com/crm/v3/objects/deals/{deal_id}
- Purpose: Sends a GET request to retrieve the specified deal from HubSpot.
2. Preconditions
- Precondition:
hubspot_api.response.status == 200
- Purpose: Ensures successful retrieval of the deal with HTTP status code 200.
Response
- The function returns the result from the HubSpot API response.
Success response
{
"deal_id": 22413038713,
"properties": [],
"properties_with_history": [
"closed_won_reason"
]
}
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
{
"deal_id": 22413038713,
"properties": [],
"properties_with_history": [
"closed_won_reason"
]
}
Output
{
"id": "22413038713",
"properties": {
"amount": "1456.55",
.
.
.
},
"createdAt": "2024-09-26T12:02:50.213Z",
"updatedAt": "2024-09-26T12:02:50.213Z",
"archived": false
}
Version notes
2024-10-04 14:21:55
Current