HubSpot CRM
25 min
the hubspot crm connector facilitates the integration of hubspot's crm capabilities into automated workflows, enabling efficient management and analysis of customer data hubspot crm is a comprehensive customer relationship management platform that helps businesses manage their sales, marketing, and customer service efforts in one place the hubspot crm connector for swimlane turbine enables users to automate the creation, retrieval, and updating of company records within hubspot crm directly from the swimlane platform by integrating with hubspot crm, users can streamline their sales and marketing workflows, maintain up to date customer information, and enhance their overall customer engagement strategies without the need for manual data entry or complex api interactions prerequisites to effectively utilize the hubspot crm connector with swimlane turbine, you must have the following oauth2 refresh token authentication with these parameters url the endpoint url for hubspot api access client id your hubspot application's client identifier client secret the secret key associated with your hubspot application refresh token a token used to obtain a new access token when the current one expires asset setup client credential flow authentication authentication uses hubspot application oauth2 you will need an admin account in hubspot to create the application in order to set up the asset, you need the following a developer account an app associated with your developer account steps to create developer account conick on the developer account https //app hubspot com/signup hubspot/developers? ga=2 207664146 1651439249 1582052738 500942594 1573763828\&step=landing page click on the continue with this user click on the create a new developer account add job role and company steps to create the hubspot app after developer account created then click on create new app enter a name for your new application and add logo click on the auth tab and give the required scopes for the endpoints and redirect url the client id and client secret needed in the asset are shown on this page after adding all the fields, click on create app button how to generate refresh token and pass it in the asset the refresh token generated by following oauth 2 0 refresh token grant, which requires a 'redirect uri', 'client id' and 'client secret' to generate a refresh token please follow the instructions below in steps of the above mentioned setup instructions, please provide a 'redirect uri' before clicking on create app at the the bottom copy the 'client id' and 'client secret' from the app the swimlane team will provide a python script and instructions on how to use the script to generate the refresh token capabilities this connector provides the following capabilities create companies get company by id retrieve companies update company configurations hubspot oauth 2 0 refresh token authenticates using hubspot oauth 2 0 credentials configuration parameters parameter description type required url a url to the target host string required client id the client id string required client secret the client secret string required refresh token refresh token used to obtain new access tokens please refer readme to generate refresh token string required verify ssl verify ssl certificate boolean optional http proxy a proxy to route requests through string optional actions create companies enables the creation of new companies in hubspot crm using specified properties endpoint url crm/v3/objects/companies method post input argument name type required description properties object required parameter for create companies name string required the name of the company domain string required the company's website domain city string optional the city where the company is located industry string optional the type of business the company performs by default, this property has approximately 150 pre defined options to select from phone string optional the company's primary phone number state string optional the state or region where the company is located lifecyclestage string optional a property used to indicate at what point the company is within the marketing/sales process associations array optional parameter for create companies to object required the record or activity you want to associate with the company, specified by its unique id value id number required unique identifier types array required the type of the association between the company and the record/activity include the associationcategoryand associationtypeid associationcategory string required parameter for create companies associationtypeid number required unique identifier output parameter type description status code number http status code of the response reason string response reason phrase id string unique identifier properties object output field properties city string output field city createdate string date value domain string output field domain hs lastmodifieddate string date value hs object id string unique identifier hs object source string output field hs object source hs object source id string unique identifier hs object source label string output field hs object source label hs pipeline string output field hs pipeline lifecyclestage string output field lifecyclestage name string name of the resource phone string output field phone state string output field state website string output field website createdat string output field createdat updatedat string output field updatedat archived boolean output field archived example \[ { "status code" 201, "response headers" { "date" "tue, 06 aug 2024 18 32 51 gmt", "content type" "application/json;charset=utf 8", "content length" "281", "connection" "keep alive", "location" "https //api hubapi com/crm/v3/objects/companies/22268214699", "cf ray" "8af11ca6ffc37efe maa", "cf cache status" "dynamic", "content encoding" "gzip", "strict transport security" "max age=31536000; includesubdomains; preload", "vary" "origin, accept encoding", "access control allow credentials" "false", "x content type options" "nosniff", "x envoy upstream service time" "196", "x evy trace listener" "listener https", "x evy trace route configuration" "listener https/all" }, "reason" "created", "json body" { "id" "22268214699", "properties" {}, "createdat" "2024 08 06t18 32 51 228z", "updatedat" "2024 08 06t18 32 51 228z", "archived" false } } ] get company by id retrieve details for a specific company in hubspot crm using the unique company id provided as a path parameter endpoint url /crm/v3/objects/companies/{{companyid}} method get input argument name type required description properties string optional a comma separated list of the properties to be returned in the response if the requested company doesn't have a value for a property, it will not appear in the response propertieswithhistory string optional a comma separated list of the current and historical properties to be returned in the response if the requested company doesn't have a value for a property, it will not appear in the response associations string optional a comma separated list of objects to retrieve associated ids for any specified associations that don't exist will not be returned in the response companyid string required company id output parameter type description status code number http status code of the response reason string response reason phrase id string unique identifier properties object output field properties createdate string date value domain string output field domain hs lastmodifieddate string date value hs object id string unique identifier name string name of the resource propertieswithhistory object output field propertieswithhistory name array name of the resource value string value for the parameter timestamp string output field timestamp sourcetype string type of the resource sourceid string unique identifier createdat string output field createdat updatedat string output field updatedat archived boolean output field archived example \[ { "status code" 200, "response headers" { "date" "tue, 06 aug 2024 19 18 11 gmt", "content type" "application/json;charset=utf 8", "content length" "279", "connection" "keep alive", "cf ray" "8af15f1038de7efe maa", "cf cache status" "dynamic", "content encoding" "gzip", "strict transport security" "max age=31536000; includesubdomains; preload", "vary" "origin, accept encoding", "access control allow credentials" "false", "x content type options" "nosniff", "x envoy upstream service time" "108", "x evy trace listener" "listener https", "x evy trace route configuration" "listener https/all", "x evy trace route service name" "envoyset translator" }, "reason" "ok", "json body" { "id" "22267481744", "properties" {}, "propertieswithhistory" {}, "createdat" "2024 08 06t17 44 03 735z", "updatedat" "2024 08 06t18 43 55 564z", "archived" false } } ] retrieve companies retrieves a comprehensive list of companies from hubspot crm, complete with names, ids, and associated contacts endpoint url /crm/v3/objects/companies method get input argument name type required description properties string optional a comma separated list of the properties to be returned in the response if the requested company doesn't have a value for a property, it will not appear in the response propertieswithhistory string optional a comma separated list of the current and historical properties to be returned in the response if the requested company doesn't have a value for a property, it will not appear in the response associations string optional a comma separated list of objects to retrieve associated ids for any specified associations that don't exist will not be returned in the response output parameter type description status code number http status code of the response reason string response reason phrase results array result of the operation id string unique identifier properties object output field properties createdate string date value domain string output field domain hs lastmodifieddate string date value hs object id string unique identifier name string name of the resource createdat string output field createdat updatedat string output field updatedat archived boolean output field archived example \[ { "status code" 200, "response headers" { "date" "tue, 06 aug 2024 18 03 10 gmt", "content type" "application/json;charset=utf 8", "content length" "242", "connection" "keep alive", "cf ray" "8af0f12dba297efe maa", "cf cache status" "dynamic", "content encoding" "gzip", "strict transport security" "max age=31536000; includesubdomains; preload", "vary" "origin, accept encoding", "access control allow credentials" "false", "x content type options" "nosniff", "x envoy upstream service time" "87", "x evy trace listener" "listener https", "x evy trace route configuration" "listener https/all", "x evy trace route service name" "envoyset translator" }, "reason" "ok", "json body" { "results" \[] } } ] update company updates a company's details in hubspot crm using the provided company id and specified properties endpoint url /crm/v3/objects/companies/{{companyid}} method patch input argument name type required description companyid string required unique identifier properties object required parameter for update company name string optional the name of the company domain string optional the company's website domain city string optional the city where the company is located industry string optional the type of business the company performs by default, this property has approximately 150 pre defined options to select from phone string optional the company's primary phone number state string optional the state or region where the company is located lifecyclestage string optional a property used to indicate at what point the company is within the marketing/sales process output parameter type description status code number http status code of the response reason string response reason phrase id string unique identifier properties object output field properties city string output field city createdate string date value hs lastmodifieddate string date value hs object id string unique identifier hs object source string output field hs object source hs object source id string unique identifier hs object source label string output field hs object source label hs pipeline string output field hs pipeline lifecyclestage string output field lifecyclestage createdat string output field createdat updatedat string output field updatedat archived boolean output field archived example \[ { "status code" 200, "response headers" { "date" "tue, 06 aug 2024 19 26 09 gmt", "content type" "application/json;charset=utf 8", "content length" "239", "connection" "keep alive", "cf ray" "8af16aba9f477efe maa", "cf cache status" "dynamic", "content encoding" "gzip", "strict transport security" "max age=31536000; includesubdomains; preload", "vary" "origin, accept encoding", "access control allow credentials" "false", "x content type options" "nosniff", "x envoy upstream service time" "109", "x evy trace listener" "listener https", "x evy trace route configuration" "listener https/all", "x evy trace route service name" "envoyset translator" }, "reason" "ok", "json body" { "id" "22267481744", "properties" {}, "createdat" "2024 08 06t17 44 03 735z", "updatedat" "2024 08 06t18 43 55 564z", "archived" false } } ] response headers header description example access control allow credentials http response header access control allow credentials false cf cache status http response header cf cache status dynamic cf ray http response header cf ray 8af15f1038de7efe maa connection http response header connection keep alive content encoding http response header content encoding gzip content length the length of the response body in bytes 239 content type the media type of the resource application/json;charset=utf 8 date the date and time at which the message was originated tue, 06 aug 2024 19 18 11 gmt location the url to redirect a page to https //api hubapi com/crm/v3/objects/companies/22268214699 https //api hubapi com/crm/v3/objects/companies/22268214699 nel http response header nel {"success fraction" 0 01,"report to" "cf nel","max age" 604800 } report to http response header report to {"endpoints" \[{"url" " https //a nel cloudflare com/report/v4?s=dkxeil0ruajmcealkeadh5tiozvth7anqy4ky0au4sczbavdbhwnekaek8yb8rr9zlk5ncjzc9rwlow5ejhrx3c%2b8rbgf7gz5smtkvvjm2fqhlolik1x96%2bulgmrocwc"}],"group" "cf nel","max age https //a nel cloudflare com/report/v4?s=dkxeil0ruajmcealkeadh5tiozvth7anqy4ky0au4sczbavdbhwnekaek8yb8rr9zlk5ncjzc9rwlow5ejhrx3c%2b8rbgf7gz5smtkvvjm2fqhlolik1x96%2bulgmrocwc"}],"group" "cf nel","max age " 604800 } server information about the software used by the origin server cloudflare strict transport security http response header strict transport security max age=31536000; includesubdomains; preload vary http response header vary origin, accept encoding x content type options http response header x content type options nosniff x envoy upstream service time http response header x envoy upstream service time 109 x evy trace listener http response header x evy trace listener listener https x evy trace route configuration http response header x evy trace route configuration listener https/all x evy trace route service name http response header x evy trace route service name envoyset translator x evy trace served by pod http response header x evy trace served by pod iad02/hubapi td/envoy proxy 85b74c4c74 vx2dg x evy trace virtual host http response header x evy trace virtual host all x hubspot correlation id http response header x hubspot correlation id b586a2c4 9d99 4ba5 8c92 ceca0684b4b9 x hubspot ratelimit interval milliseconds http response header x hubspot ratelimit interval milliseconds 10000 x hubspot ratelimit max http response header x hubspot ratelimit max 100 x hubspot ratelimit remaining http response header x hubspot ratelimit remaining 99 notes api documentation https //developers hubspot com/docs/api/crm/companiesassociation ids https //developers hubspot com/docs/api/crm/associations#association type id valuesassociation apis https //developers hubspot com/docs/api/crm/associations