Hubspot Component
Manage objects and associations in the Hubspot CRM platform
Component key: hubspotDescription
Hubspot is a Customer Relationship Management software for inbound marketing, sales, and customer service. This component allows you to interact with the Hubspot REST API.
API Documentation
This component was built using the Hubpost API Documentation
Documentation for Hubspot's REST API used in this component can be found at https://developers.hubspot.com/docs/api/overview.
If a Hubspot API endpoint doesn't have a corresponding action within this component, you can leverage the Raw Request action to make a request to any Hubspot API endpoint.
Processing Hubspot events in real-time
Hubspot requires that you provide only one webhook URL for your app, and Hubspot will send all customers' events to that URL. If you would like to detect and process changes to your customers' Hubspot accounts in real-time, see the Single-Endpoint Webhook Integrations guide on handling webhook requests from apps that require you to specify a single webhook endpoint.
Connections
Hubspot OAuth 2.0
The Hubspot component authenticates requests through a OAuth 2.0 credential. Information on how to generate an OAuth 2.0 credential with Hubspot can be found here Now, you will have to configure a new OAuth 2.0 Hubspot connection in Prismatic.
- For Client ID and Client Secret enter the values that you got from the Hubspot auth settings.
- For Scopes choose from the list found on the Hubspot docs
- Under the Redirect URLs section add
https://oauth2.prismatic.io/callback
for US based integrations.- For integrations outside the US refer to this guide to find your region’s Callback URL.
Private App Access Token
Triggers
Event Type Subscription
Get notified when a Hubspot event happens. | key: eventTypeSubscription
Webhook
Receive and validate webhook requests from Hubspot for webhooks you configure. | key: webhook
{
"payload": {
"headers": {
"Accept": "*/*",
"Content-Type": "application/json",
"Host": "hooks.ci.prismatic-dev.io",
"User-Agent": "HubSpot Connect 2.0 (http://dev.hubspot.com/) (namespace: webhooks-nio-http-client) - WebhooksExecutorDaemon-executor",
"X-Amz-Cf-Id": "ABCDEFGHI",
"X-Amzn-Trace-Id": "Root=1-65dd10e7-527c83667c3d96380250fd05",
"X-Forwarded-For": "54.174.62.123, 15.158.50.123",
"X-HubSpot-Request-Timestamp": "1708986599647",
"X-HubSpot-Signature": "123456789",
"X-HubSpot-Signature-v3": "123456789",
"X-HubSpot-Signature-Version": "v1",
"X-HubSpot-Timeout-Millis": "10000",
"X-Trace": ""
},
"queryParameters": null,
"rawBody": {
"data": ""
},
"body": {
"data": [
{
"eventId": 123456,
"subscriptionId": 123456,
"portalId": 123456,
"appId": 123456,
"occurredAt": 1708986598741,
"subscriptionType": "contact.creation",
"attemptNumber": 0,
"objectId": 2001,
"changeFlag": "CREATED",
"changeSource": "CRM_UI",
"sourceId": "userId:123456"
}
],
"contentType": "application/json"
},
"pathFragment": "",
"webhookUrls": {
"Webhook": "https://hooks.ci.prismatic-dev.io/trigger/123456=="
},
"webhookApiKeys": {
"Webhook": [
"sample-api-key"
]
},
"invokeUrl": "https://hooks.ci.prismatic-dev.io/trigger/123456==",
"executionId": "123456",
"customer": {
"id": "testCustomerId",
"name": "Test Customer",
"externalId": "testCustomerExternalId"
},
"instance": {
"id": "123456",
"name": "Hubspot - Webhook"
},
"user": {
"id": "testUserId",
"email": "testUserEmail@example.com",
"name": "Test User",
"externalId": "testUserExternalId"
},
"integration": {
"id": "123456",
"name": "Hubspot - Webhook",
"versionSequenceId": "testIntegrationVersionSequenceId"
},
"flow": {
"id": "123456==",
"name": "Webhook"
}
}
}
Data Sources
Object Selection
A list of Hubspot objects | key: getObjectSelection | type: objectSelection
Actions
Archive Association
Remove the associations between two provided objects | key: ArchiveAssociations
{
"data": {}
}
Archive Batch Contacts
Archive a batch of contacts by ID | key: archiveBatchContacts
{
"data": {}
}
Archive Batch Engagement
Archives a batch of selected engagements by their IDs. | key: archiveBatchEngagement
{
"data": {}
}
Cancel Import
Cancels an active import. | key: cancelImport
{
"data": {
"completedAt": "2024-02-07T05:02:32.700Z",
"requestedAt": "2024-02-07T05:02:32.700Z",
"startedAt": "2024-02-07T05:02:32.700Z",
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"status": "PENDING"
}
}
Create Association
Create an association between the objects identified in the step | key: createAssociations
{
"data": {
"completedAt": "2024-02-26T23:59:28.273Z",
"requestedAt": "2024-02-26T23:59:28.273Z",
"startedAt": "2024-02-26T23:59:28.273Z",
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"results": [
{
"from": {
"id": "37295"
},
"to": {
"id": "37295"
},
"type": "contact_to_company"
}
],
"status": "PENDING"
}
}
Create Batch Contacts
Create a batch of contacts | key: createBatchContacts
{
"data": {
"completedAt": "2024-02-21T08:27:09.446Z",
"requestedAt": "2024-02-21T08:27:09.446Z",
"startedAt": "2024-02-21T08:27:09.446Z",
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"results": [
{
"createdAt": "2024-02-21T08:27:09.446Z",
"archived": false,
"archivedAt": "2024-02-21T08:27:09.446Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.446Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.446Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.446Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-21T08:27:09.446Z"
}
],
"status": "PENDING"
}
}
Create Batch Engagement
Creates a batch of selected engagements. | key: createBatchEngagement
{
"data": {
"status": "COMPLETE",
"results": [
{
"id": "654321",
"properties": {
"hs_body_preview": "Send Proposal",
"hs_body_preview_html": "<html>\n <head></head>\n <body>\n Send Proposal\n </body>\n</html>",
"hs_body_preview_is_truncated": "false",
"hs_createdate": "2024-02-14T02:09:49.695Z",
"hs_lastmodifieddate": "2024-02-14T02:09:49.695Z",
"hs_object_id": "654321",
"hs_object_source": "INTEGRATION",
"hs_object_source_id": "123456",
"hs_object_source_label": "INTEGRATION",
"hs_pipeline_stage": "dd5826e4-c976-4654-a527-b59ada512345",
"hs_task_body": "Send Proposal",
"hs_task_completion_count": "0",
"hs_task_family": "SALES",
"hs_task_for_object_type": "OWNER",
"hs_task_is_all_day": "false",
"hs_task_is_completed": "0",
"hs_task_is_completed_call": "0",
"hs_task_is_completed_email": "0",
"hs_task_is_completed_linked_in": "0",
"hs_task_is_completed_sequence": "0",
"hs_task_is_overdue": "true",
"hs_task_is_past_due_date": "true",
"hs_task_missed_due_date": "true",
"hs_task_missed_due_date_count": "1",
"hs_task_priority": "HIGH",
"hs_task_status": "WAITING",
"hs_task_subject": "Follow-up for Brian Buyer",
"hs_task_type": "CALL",
"hs_timestamp": "2019-10-30T03:30:17.883Z"
},
"createdAt": "2024-02-14T02:09:49.695Z",
"updatedAt": "2024-02-14T02:09:49.695Z",
"archived": false
}
],
"startedAt": "2024-02-14T02:09:49.666Z",
"completedAt": "2024-02-14T02:09:49.903Z"
}
}
Create Company
Create a new company | key: createCompany
{
"data": {
"createdAt": "2024-02-27T00:06:42.321Z",
"archived": false,
"archivedAt": "2024-02-27T00:06:42.321Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:06:42.321Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:06:42.321Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:06:42.321Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-27T00:06:42.321Z"
}
}
Create Contact
Create a new contact | key: CreateContact
{
"data": {
"createdAt": "2024-02-27T00:20:24.825Z",
"archived": false,
"archivedAt": "2024-02-27T00:20:24.825Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:20:24.825Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:20:24.825Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:20:24.825Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-27T00:20:24.825Z"
}
}
Create Custom Object
Creates new custom object schema | key: createCustomObject
{
"data": {
"id": "123456",
"createdAt": "2020-02-20T18:07:11.390Z",
"updatedAt": "2020-02-20T18:09:07.555Z",
"properties": [
{
"updatedAt": "2020-02-20T18:07:11.802Z",
"createdAt": "2020-02-20T18:07:11.802Z",
"name": "my_object_property",
"label": "My object property",
"type": "string",
"fieldType": "text",
"groupName": "my_object_information",
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false
}
],
"associations": [
{
"id": "123",
"fromObjectTypeId": "2-123456",
"toObjectTypeId": "0-1",
"name": "my_object_to_contact"
}
],
"labels": {
"singular": "My object",
"plural": "My objects"
},
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"primaryDisplayProperty": "my_object_property",
"metaType": "PORTAL_SPECIFIC",
"fullyQualifiedName": "p7878787_my_object\"",
"name": "my_object"
}
}
Create Deal
Create a new deal | key: createDeal
{
"data": {
"createdAt": "2024-02-27T00:24:54.526Z",
"archived": false,
"archivedAt": "2024-02-27T00:24:54.526Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.526Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.526Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.526Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-27T00:24:54.526Z"
}
}
Create Engagement
Create a communication, email, call, meeting, note, postal mail or task engagement in HubSpot CRM. | key: createEngagement
{
"data": {
"id": "123456789",
"properties": {
"hs_body_preview": "Send Proposal",
"hs_body_preview_html": "<html>\n <head></head>\n <body>\n Send Proposal\n </body>\n</html>",
"hs_body_preview_is_truncated": "false",
"hs_createdate": "2024-02-12T21:27:23.876Z",
"hs_lastmodifieddate": "2024-02-12T21:27:23.876Z",
"hs_object_id": "123456789",
"hs_object_source": "INTEGRATION",
"hs_object_source_id": "654321",
"hs_object_source_label": "INTEGRATION",
"hs_task_body": "Send Proposal",
"hs_task_completion_count": "0",
"hs_task_family": "SALES",
"hs_task_for_object_type": "OWNER",
"hs_task_is_all_day": "false",
"hs_task_is_completed": "0",
"hs_task_is_completed_call": "0",
"hs_task_is_completed_email": "0",
"hs_task_is_completed_linked_in": "0",
"hs_task_is_completed_sequence": "0",
"hs_task_is_overdue": "true",
"hs_task_is_past_due_date": "true",
"hs_task_missed_due_date": "true",
"hs_task_missed_due_date_count": "1",
"hs_task_priority": "HIGH",
"hs_task_status": "WAITING",
"hs_task_subject": "Follow-up for Brian Buyer",
"hs_task_type": "CALL",
"hs_timestamp": "2024-01-30T03:30:17.883Z"
},
"createdAt": "2024-02-12T21:27:23.876Z",
"updatedAt": "2024-02-12T21:27:23.876Z",
"archived": false
}
}
Create Line Item
Create a new line item | key: createLineItem
{
"data": {
"createdAt": "2024-02-27T00:31:42.469Z",
"archived": false,
"archivedAt": "2024-02-27T00:31:42.469Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:31:42.469Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:31:42.469Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:31:42.469Z"
}
]
},
"id": "512",
"properties": {
"name": "1 year implementation consultation",
"price": "6000.00",
"quantity": "2",
"hs_product_id": "191902",
"recurringbillingfrequency": "monthly",
"hs_recurring_billing_period": "P24M"
},
"updatedAt": "2024-02-27T00:31:42.469Z"
}
}
Create Product
Create a new product | key: createProduct
{
"data": {
"createdAt": "2024-02-27T00:35:05.442Z",
"archived": false,
"archivedAt": "2024-02-27T00:35:05.442Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:35:05.442Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:35:05.442Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:35:05.442Z"
}
]
},
"id": "512",
"properties": {
"name": "Implementation Service",
"price": "6000.00",
"hs_sku": "191902",
"description": "Onboarding service for data product",
"hs_cost_of_goods_sold": "600.00",
"hs_recurring_billing_period": "P12M"
},
"updatedAt": "2024-02-27T00:35:05.442Z"
}
}
Create Webhook
Create a webhook in HubSpot | key: createWebhook
{
"data": {
"createdAt": "2024-02-16T20:53:52.517Z",
"propertyName": "string",
"active": true,
"eventType": "contact.propertyChange",
"id": "string",
"updatedAt": "2024-02-16T20:53:52.517Z"
}
}
Delete all Instanced Webhooks
Delete all webhooks created by this instance in HubSpot | key: deleteAllWebhooks
{
"data": {
"message": "All webhooks deleted successfully"
}
}
Delete Company
Delete an existing company by Id | key: deleteCompany
{
"data": {}
}
Delete Contact
Delete a contact by Id | key: deleteContact
{
"data": {}
}
Delete Custom Object
Removes custom object schema | key: deleteCustomObject
{
"data": {
"id": "123456",
"createdAt": "2020-02-20T18:07:11.390Z",
"updatedAt": "2020-02-20T18:09:07.555Z",
"properties": [
{
"updatedAt": "2020-02-20T18:07:11.802Z",
"createdAt": "2020-02-20T18:07:11.802Z",
"name": "my_object_property",
"label": "My object property",
"type": "string",
"fieldType": "text",
"groupName": "my_object_information",
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false
}
],
"associations": [
{
"id": "123",
"fromObjectTypeId": "2-123456",
"toObjectTypeId": "0-1",
"name": "my_object_to_contact"
}
],
"labels": {
"singular": "My object",
"plural": "My objects"
},
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"primaryDisplayProperty": "my_object_property",
"metaType": "PORTAL_SPECIFIC",
"fullyQualifiedName": "p7878787_my_object\"",
"name": "my_object"
}
}
Delete Deal
Delete a deal by its Id | key: deleteDeal
{
"data": {}
}
Delete Engagement
Deletes an engagement by its ID. | key: deleteEngagement
{
"data": {}
}
Delete Line Item
Delete an existing line item by Id | key: deleteLineItem
{
"data": {}
}
Delete Product
Delete a product by Id | key: deleteProduct
{
"data": {}
}
Delete Webhook
Delete a webhook by ID in HubSpot | key: deleteWebhook
{
"data": {}
}
Export CRM Data
Begins exporting CRM data for the portal as specified in the request body. | key: exportCRMData
{
"data": {
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"id": "string"
}
}
Get an Import
Get a complete summary of an import record, including any updates. | key: getAnImport
{
"data": {
"importTemplate": {
"templateType": "admin_defined",
"templateId": 0
},
"createdAt": "2024-02-07T05:02:32.691Z",
"metadata": {
"counters": {
"TOTAL_ROWS": 2,
"CREATED_OBJECTS": 1,
"UPDATED_OBJECTS": 1,
"UNIQUE_OBJECTS_WRITTEN": 2,
"PROPERTY_VALUES_EMITTED": 2
},
"fileIds": [
"3579849"
],
"objectLists": [
{
"listId": "3",
"objectType": "contacts"
}
]
},
"importRequestJson": {},
"importSource": "API",
"importName": "string",
"state": "DONE",
"id": "1471",
"optOutImport": false,
"updatedAt": "2024-02-07T05:02:32.692Z"
}
}
Get Batch Contacts
Read a batch of contacts by internal ID, or unique property values. | key: getBatchContacts
{
"data": {
"completedAt": "2024-02-21T08:27:09.454Z",
"requestedAt": "2024-02-21T08:27:09.454Z",
"startedAt": "2024-02-21T08:27:09.454Z",
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"results": [
{
"createdAt": "2024-02-21T08:27:09.454Z",
"archived": false,
"archivedAt": "2024-02-21T08:27:09.454Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.454Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.454Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.454Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-21T08:27:09.454Z"
}
],
"status": "PENDING"
}
}
Get Company
Retrieve the information or metadata of a company by Id, domain, or name | key: getCompany
Get Contact
Get the information and metadata of a contact by Id or Email | key: getContact
Get Current User
Return information about the current session's user. | key: getCurrentUser
{
"data": {
"results": {
"portalId": 123456,
"timeZone": "US/Eastern",
"accountType": "DEVELOPER_TEST",
"currency": "USD",
"utcOffset": "-05:00",
"utcOffsetMilliseconds": -18000000,
"user_id": 456789,
"user": "example@mail.com"
}
}
}
Get Custom Object
Retrieves a specific custom object | key: getCustomObject
{
"data": {
"id": "123456",
"createdAt": "2020-02-20T18:07:11.390Z",
"updatedAt": "2020-02-20T18:09:07.555Z",
"properties": [
{
"updatedAt": "2020-02-20T18:07:11.802Z",
"createdAt": "2020-02-20T18:07:11.802Z",
"name": "my_object_property",
"label": "My object property",
"type": "string",
"fieldType": "text",
"groupName": "my_object_information",
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false
}
],
"associations": [
{
"id": "123",
"fromObjectTypeId": "2-123456",
"toObjectTypeId": "0-1",
"name": "my_object_to_contact"
}
],
"labels": {
"singular": "My object",
"plural": "My objects"
},
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"primaryDisplayProperty": "my_object_property",
"metaType": "PORTAL_SPECIFIC",
"fullyQualifiedName": "p7878787_my_object\"",
"name": "my_object"
}
}
Get Deal
Retrieve information and metadata about a deal by its Id or name | key: getDealById
Get Engagement
Get a communication, email, call, meeting, note, postal mail or task engagement object from HubSpot CRM. | key: getEngagement
{
"data": {
"id": "12345",
"properties": {
"hs_createdate": "2024-02-12T01:42:51.758Z",
"hs_lastmodifieddate": "2024-02-12T01:42:51.950Z",
"hs_object_id": "12345",
"hs_task_body": "<div style=\"\" dir=\"auto\" data-top-level=\"true\"><br></div>",
"hs_timestamp": "2024-02-14T14:00:00Z"
},
"propertiesWithHistory": {
"hs_task_body": [
{
"value": "<div style=\"\" dir=\"auto\" data-top-level=\"true\"><br></div>",
"timestamp": "2024-02-12T01:42:51.758Z",
"sourceType": "CRM_UI",
"sourceId": "userId:12345",
"updatedByUserId": 12345
}
]
},
"createdAt": "2024-02-12T01:42:51.758Z",
"updatedAt": "2024-02-12T01:42:51.950Z",
"archived": false
}
}
Get Line Item
Retrieve the information and metadata of a line item by Id | key: getLineItem
Get Product
Retrieve the information and metadata of a product by Id or name | key: getProduct
Import CRM Data
Import CRM records and activities into your HubSpot account, such as contacts, companies, and notes. | key: importCRMData
{
"data": {
"importTemplate": {
"templateType": "admin_defined",
"templateId": 0
},
"createdAt": "2024-02-07T05:02:32.679Z",
"metadata": {
"counters": {
"TOTAL_ROWS": 2,
"CREATED_OBJECTS": 1,
"UPDATED_OBJECTS": 1,
"UNIQUE_OBJECTS_WRITTEN": 2,
"PROPERTY_VALUES_EMITTED": 2
},
"fileIds": [
"3579849"
],
"objectLists": [
{
"listId": "3",
"objectType": "contacts"
}
]
},
"importRequestJson": {},
"importSource": "API",
"importName": "string",
"state": "DONE",
"id": "1471",
"optOutImport": false,
"updatedAt": "2024-02-07T05:02:32.679Z"
}
}
List Active Imports
Returns a paged list of active imports for this account. | key: listActiveImports
{
"data": [
{
"importTemplate": {
"templateType": "admin_defined",
"templateId": 0
},
"createdAt": "2024-02-07T05:02:32.668Z",
"metadata": {
"counters": {
"TOTAL_ROWS": 2,
"CREATED_OBJECTS": 1,
"UPDATED_OBJECTS": 1,
"UNIQUE_OBJECTS_WRITTEN": 2,
"PROPERTY_VALUES_EMITTED": 2
},
"fileIds": [
"3579849"
],
"objectLists": [
{
"listId": "3",
"objectType": "contacts"
}
]
},
"importRequestJson": {},
"importSource": "API",
"importName": "string",
"state": "DONE",
"id": "1471",
"optOutImport": false,
"updatedAt": "2024-02-07T05:02:32.668Z"
}
]
}
List Association Types
Retrieve a list of all association types available between two objects | key: listAssociationTypes
{
"data": {
"results": [
{
"name": "contact_to_company",
"id": "1"
}
]
}
}
List Companies
Retrieve a list of all companies | key: listCompanies
{
"data": {
"results": [
{
"id": 12345,
"properties": {
"createdate": "2021-09-14T@@:36:404Z",
"domain": null,
"hs_lastmodifieddate": "2021-09-14T@@:36:404Z",
"hs_object_id": 12345,
"name": "Example Company"
},
"pipeline": "default",
"createdAt": "2021-09-14T@@:36:404Z",
"updatedAt": "2021-09-14T@@:36:404Z",
"archived": false
}
],
"paging": {
"next": {
"after": "123456789",
"link": "https://api.hubapi.com/crm/v3/objects/products?limit=1&after=123456789"
}
}
}
}
List Contacts
Retrieve a list of all contacts | key: listContacts
{
"data": {
"results": [
{
"id": 12345,
"properties": {
"createdate": "2021-09-14T@@:36:404Z",
"email": "someone@example.com",
"firstname": "John",
"hs_lastmodifieddate": "2021-09-14T@@:36:404Z",
"lastname": "Doe",
"hs_object_id": 12345
},
"pipeline": "default",
"createdAt": "2021-09-14T@@:36:404Z",
"updatedAt": "2021-09-14T@@:36:404Z",
"archived": false
}
],
"paging": {
"next": {
"after": "123456789",
"link": "https://api.hubapi.com/crm/v3/objects/products?limit=1&after=123456789"
}
}
}
}
List Custom Objects
Retrieve all custom objects | key: listCustomObjects
{
"data": {
"results": [
{
"id": "123456",
"createdAt": "2020-02-20T18:07:11.390Z",
"updatedAt": "2020-02-20T18:09:07.555Z",
"properties": [
{
"updatedAt": "2020-02-20T18:07:11.802Z",
"createdAt": "2020-02-20T18:07:11.802Z",
"name": "my_object_property",
"label": "My object property",
"type": "string",
"fieldType": "text",
"groupName": "my_object_information",
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false
}
],
"associations": [
{
"id": "123",
"fromObjectTypeId": "2-123456",
"toObjectTypeId": "0-1",
"name": "my_object_to_contact"
}
],
"labels": {
"singular": "My object",
"plural": "My objects"
},
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"primaryDisplayProperty": "my_object_property",
"metaType": "PORTAL_SPECIFIC",
"fullyQualifiedName": "p7878787_my_object\"",
"name": "my_object"
}
]
}
}
List Deals
Retrieve a list of all deals | key: listDeals
{
"data": {
"results": [
{
"id": 12345,
"properties": {
"amount": "600.00",
"closedate": "2021-09-14T@@:36:404Z",
"createdate": "2021-09-14T@@:36:404Z",
"dealname": "My Example Deal",
"dealstage": "presentationscheduled",
"hs_lastmodifieddate": "2021-09-14T@@:36:404Z",
"hs_object_id": 12345
},
"pipeline": "default",
"createdAt": "2021-09-14T@@:36:404Z",
"updatedAt": "2021-09-14T@@:36:404Z",
"archived": false
}
],
"paging": {
"next": {
"after": "123456789",
"link": "https://api.hubapi.com/crm/v3/objects/products?limit=1&after=123456789"
}
}
}
}
List Engagements
List engagement objects from HubSpot CRM, including communications, emails, calls, meetings, notes, postal mail, and tasks. | key: listEngagements
{
"data": [
{
"id": "47231018154",
"properties": {
"hs_createdate": "2024-02-12T01:42:51.758Z",
"hs_lastmodifieddate": "2024-02-12T01:42:51.950Z",
"hs_object_id": "47231018154"
},
"createdAt": "2024-02-12T01:42:51.758Z",
"updatedAt": "2024-02-12T01:42:51.950Z",
"archived": false
},
{
"id": "47231018317",
"properties": {
"hs_createdate": "2024-02-12T01:43:03.422Z",
"hs_lastmodifieddate": "2024-02-12T01:43:03.891Z",
"hs_object_id": "47231018317"
},
"createdAt": "2024-02-12T01:43:03.422Z",
"updatedAt": "2024-02-12T01:43:03.891Z",
"archived": false
}
]
}
List Line Items
Retrieve a list of all line items | key: listLineItems
{
"data": {
"results": [
{
"id": 12345,
"properties": {
"amount": "600.00",
"createdate": "2021-09-14T@@:36:404Z",
"hs_lastmodifieddate": "2021-09-14T@@:36:404Z",
"hs_object_id": 12345,
"hs_product_id": 12345,
"quantity": null
}
}
],
"paging": {
"next": {
"after": "123456789",
"link": "https://api.hubapi.com/crm/v3/objects/products?limit=1&after=123456789"
}
}
}
}
List Products
Retrieve a list of all products | key: listProducts
{
"data": {
"results": [
{
"id": 12345,
"properties": {
"createdate": "2021-09-14T@@:36:404Z",
"hs_lastmodifieddate": "2021-09-14T@@:36:404Z",
"hs_object_id": 12345,
"name": "Example Product",
"price": "6000.00"
}
}
],
"paging": {
"next": {
"after": "123456789",
"link": "https://api.hubapi.com/crm/v3/objects/products?limit=1&after=123456789"
}
}
}
}
List Properties
Retrieve a list of all configured object properties. | key: listProperties
{
"data": {
"results": [
{
"createdUserId": "string",
"hidden": false,
"modificationMetadata": {
"readOnlyOptions": true,
"readOnlyValue": true,
"readOnlyDefinition": true,
"archivable": true
},
"displayOrder": 2,
"description": "string",
"showCurrencySymbol": true,
"label": "My Contact Property",
"type": "enumeration",
"hubspotDefined": true,
"formField": true,
"createdAt": "2024-02-27T00:33:18.016Z",
"archivedAt": "2024-02-27T00:33:18.016Z",
"archived": true,
"groupName": "contactinformation",
"referencedObjectType": "string",
"name": "my_contact_property",
"options": [
{
"hidden": false,
"displayOrder": 1,
"description": "Choice number one",
"label": "Option A",
"value": "A"
}
],
"calculationFormula": "string",
"hasUniqueValue": false,
"fieldType": "select",
"updatedUserId": "string",
"calculated": true,
"externalOptions": true,
"updatedAt": "2024-02-27T00:33:18.016Z"
}
]
}
}
List Webhooks
List all webhooks for a server | key: listWebhooks
{
"data": [
{
"createdAt": "2024-02-16T20:53:52.503Z",
"propertyName": "string",
"active": true,
"eventType": "contact.propertyChange",
"id": "string",
"updatedAt": "2024-02-16T20:53:52.503Z"
}
]
}
Raw Request
Send raw HTTP request to Hubspot | key: rawRequest
This action allows you to make requests to any Hubspot API endpoint. This is especially helpful for search endpoints, where objects may have custom properties that are unique to your customers.
The data that you send to Hubspot can be dynamically generated in a code step.
Then, you can pass the code step's results as an input reference to the Data
input.
For example, if you are using Hubspot's search API to search for Hubspot "deals" that have the name "Sample Deal" and are valued less than 100 dollars, you can create a code step that reads like this:
module.exports = async ({ logger, configVars }, stepResults) => {
const data = {
filterGroups: [
{
filters: [
{
propertyName: "dealname",
operator: "EQ",
value: "Sample Deal",
},
{
propertyName: "amount",
operator: "LT",
value: "100",
},
],
},
],
properties: [
"hs_object_id",
"createdate",
"hubspot_owner_id",
"dealstage",
"amount",
"dealname",
"closedate",
"days_to_close",
"hs_analytics_source",
"hs_analytics_source_data_1",
"hs_analytics_source_data_2",
"hs_campaign",
"hs_closed_amount",
"hs_lastmodifieddate",
"dealtype",
"description",
],
};
return { data };
};
On the raw request step, enter /crm/v3/objects/deals/search
as the URL
input, POST
as the Method
, and reference the code step's results
as the Data
input.
Read Association
Get the Ids of the objects associated with those specified in the step | key: readAssociations
{
"data": {
"completedAt": "2024-02-26T23:59:28.283Z",
"requestedAt": "2024-02-26T23:59:28.283Z",
"startedAt": "2024-02-26T23:59:28.283Z",
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"results": [
{
"from": {
"id": "37295"
},
"paging": {
"next": {
"link": "string",
"after": "string"
},
"prev": {
"before": "string",
"link": "string"
}
},
"to": [
{
"id": "172859",
"type": "contact_to_company"
}
]
}
],
"status": "PENDING"
}
}
Search
Use the search endpoints to filter, sort, and search objects, records, and engagements across your CRM. | key: search
{
"data": {
"results": {
"total": 2,
"results": [
{
"id": "651",
"properties": {
"createdate": "2023-12-22T16:37:23.758Z",
"email": "example@email.com",
"firstname": "John",
"hs_object_id": "651",
"lastmodifieddate": "2024-02-25T19:39:45.324Z",
"lastname": "Doe"
},
"createdAt": "2023-12-22T16:37:23.758Z",
"updatedAt": "2024-02-25T19:39:45.324Z",
"archived": false
}
],
"paging": {
"next": {
"after": "1"
}
}
}
}
}
Search Deals
Returns a list of deals that match the given properties | key: searchDeals
{
"data": {
"total": 0,
"paging": {
"next": {
"link": "?after=NTI1Cg%3D%3D",
"after": "NTI1Cg%3D%3D"
}
},
"results": [
{
"createdAt": "2024-02-27T00:24:54.571Z",
"archived": false,
"archivedAt": "2024-02-27T00:24:54.571Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.571Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.571Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.571Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-27T00:24:54.571Z"
}
]
}
}
Update Batch Contacts
Update a batch of contacts | key: updateBatchContacts
{
"data": {
"completedAt": "2024-02-21T08:27:09.462Z",
"requestedAt": "2024-02-21T08:27:09.462Z",
"startedAt": "2024-02-21T08:27:09.462Z",
"links": {
"additionalProp1": "string",
"additionalProp2": "string",
"additionalProp3": "string"
},
"results": [
{
"createdAt": "2024-02-21T08:27:09.462Z",
"archived": false,
"archivedAt": "2024-02-21T08:27:09.462Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.462Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.462Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-21T08:27:09.462Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-21T08:27:09.462Z"
}
],
"status": "PENDING"
}
}
Update Batch Engagement
Updates a batch of selected engagements. | key: updateBatchEngagement
{
"data": {
"status": "COMPLETE",
"results": [
{
"id": "12345678",
"properties": {
"hs_body_preview": "Updated",
"hs_body_preview_html": "<html>\n <head></head>\n <body>\n Updated\n </body>\n</html>",
"hs_body_preview_is_truncated": "false",
"hs_createdate": "2024-02-14T02:31:49.230Z",
"hs_lastmodifieddate": "2024-02-14T02:31:49.651Z",
"hs_object_id": "12345678",
"hs_pipeline_stage": "dd5826e4-c976-4654-a527-b59ada12345",
"hs_task_body": "Updated"
},
"createdAt": "2024-02-14T02:31:49.230Z",
"updatedAt": "2024-02-14T02:31:49.651Z",
"archived": false
}
],
"startedAt": "2024-02-14T02:31:49.629Z",
"completedAt": "2024-02-14T02:31:49.703Z"
}
}
Update Company
Update the information and metadata of an existing company | key: updateCompany
{
"data": {
"createdAt": "2024-02-27T00:06:42.336Z",
"archived": false,
"archivedAt": "2024-02-27T00:06:42.336Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:06:42.336Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:06:42.336Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:06:42.336Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-27T00:06:42.336Z"
}
}
Update Contact
Update the information and metadata of an existing contact | key: updateContact
{
"data": {
"createdAt": "2024-02-27T00:20:24.840Z",
"archived": false,
"archivedAt": "2024-02-27T00:20:24.840Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:20:24.840Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:20:24.840Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:20:24.840Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-27T00:20:24.840Z"
}
}
Update Custom Object
Updates an object's schema | key: updateCustomObject
{
"data": {
"id": "123456",
"createdAt": "2020-02-20T18:07:11.390Z",
"updatedAt": "2020-02-20T18:09:07.555Z",
"properties": [
{
"updatedAt": "2020-02-20T18:07:11.802Z",
"createdAt": "2020-02-20T18:07:11.802Z",
"name": "my_object_property",
"label": "My object property",
"type": "string",
"fieldType": "text",
"groupName": "my_object_information",
"displayOrder": -1,
"calculated": false,
"externalOptions": false,
"archived": false,
"hasUniqueValue": false
}
],
"associations": [
{
"id": "123",
"fromObjectTypeId": "2-123456",
"toObjectTypeId": "0-1",
"name": "my_object_to_contact"
}
],
"labels": {
"singular": "My object",
"plural": "My objects"
},
"requiredProperties": [
"my_object_property"
],
"searchableProperties": [
"my_object_property"
],
"primaryDisplayProperty": "my_object_property",
"metaType": "PORTAL_SPECIFIC",
"fullyQualifiedName": "p7878787_my_object\"",
"name": "my_object"
}
}
Update Deal
Update the information or metadata of an existing deal | key: updateDeal
{
"data": {
"createdAt": "2024-02-27T00:24:54.543Z",
"archived": false,
"archivedAt": "2024-02-27T00:24:54.543Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.543Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.543Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:24:54.543Z"
}
]
},
"id": "512",
"properties": {
"property_date": "1572480000000",
"property_radio": "option_1",
"property_number": "17",
"property_string": "value",
"property_checkbox": "false",
"property_dropdown": "choice_b",
"property_multiple_checkboxes": "chocolate;strawberry"
},
"updatedAt": "2024-02-27T00:24:54.543Z"
}
}
Update Engagement
Update a communication, email, call, meeting, note, postal mail or task engagement in HubSpot CRM. | key: updateEngagement
{
"data": {
"id": "654321",
"properties": {
"hs_body_preview": "changed",
"hs_body_preview_html": "<html>\n <head></head>\n <body>\n changed\n </body>\n</html>",
"hs_body_preview_is_truncated": "false",
"hs_createdate": "2024-02-12T22:04:01.144Z",
"hs_lastmodifieddate": "2024-02-12T22:04:01.871Z",
"hs_object_id": "654321",
"hs_task_body": "changed"
},
"createdAt": "2024-02-12T22:04:01.144Z",
"updatedAt": "2024-02-12T22:04:01.871Z",
"archived": false
}
}
Update Line Item
Update an the information and metadata of an existing line item | key: updateLineItem
{
"data": {
"createdAt": "2024-02-27T00:31:42.485Z",
"archived": false,
"archivedAt": "2024-02-27T00:31:42.485Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:31:42.485Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:31:42.485Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:31:42.485Z"
}
]
},
"id": "512",
"properties": {
"name": "1 year implementation consultation",
"price": "6000.00",
"quantity": "2",
"hs_product_id": "191902",
"recurringbillingfrequency": "monthly",
"hs_recurring_billing_period": "P24M"
},
"updatedAt": "2024-02-27T00:31:42.485Z"
}
}
Update Product
Update the information and metadata of an existing product | key: updateProduct
{
"data": {
"createdAt": "2024-02-27T00:35:05.457Z",
"archived": false,
"archivedAt": "2024-02-27T00:35:05.457Z",
"propertiesWithHistory": {
"additionalProp1": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:35:05.457Z"
}
],
"additionalProp2": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:35:05.457Z"
}
],
"additionalProp3": [
{
"sourceId": "string",
"sourceType": "string",
"sourceLabel": "string",
"updatedByUserId": 0,
"value": "string",
"timestamp": "2024-02-27T00:35:05.457Z"
}
]
},
"id": "512",
"properties": {
"name": "Implementation Service",
"price": "6000.00",
"hs_sku": "191902",
"description": "Onboarding service for data product",
"hs_cost_of_goods_sold": "600.00",
"hs_recurring_billing_period": "P12M"
},
"updatedAt": "2024-02-27T00:35:05.457Z"
}
}
Validate Connection
Returns a boolean value that specifies whether the provided Connection is valid | key: validateConnection
{
"data": true
}