Hubspot -> List Deals
Action summary
Hubspot -> List Deals
HubSpot → List Deals
Overview
This function retrieves a list of deals from HubSpot. It involves setting environment variables, preparing the request with optional parameters, 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.
after (integer)
- Description: The paging cursor to get the next set of deals.
limit (integer)
- Description: The maximum number of deals to retrieve.
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
- Purpose: Sends a GET request to retrieve deals from HubSpot.
- Parameters: Includes optional
after
cursor,limit
, and specifiedproperties
.
2. Preconditions
- Precondition:
hubspot_api.response.status == 200
- Purpose: Ensures successful retrieval of deals 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
{
"after": "22393633108",
"limit": 10,
"properties": [],
"properties_with_history": [
"dealname"
]
}
Output
[
{
"id": "22393633108",
.
.
.
},
.
.
]
Version notes
2024-10-04 14:23:33
Current