HubSpot
A component that connects to HubSpot API.
Credentials
Authentication occurs through OAuth 2.0. To make OAuth work, you must create a new OAuth2 app in HubSpot or use an existing OAuth2 client during the credentials creation process.
-
Select an existing authentication client from the Choose Auth Client list or create the new one.
-
Leave the Additional parameters input empty.
-
Provide the following value in the Scopes input. If you wish to grant specific permissions, you can remove them from this list.
crm.objects.contacts.read, crm.objects.contacts.write, crm.schemas.contacts.read, crm.schemas.contacts.write, crm.objects.owners.read
-
To complete the process:
-
Click on Authenticate. If you have not logged into HubSpot before, then sign-in by entering data in the sign-in window that appears
-
Click on Verify to verify your credentials
-
Click on Save to save your credentials.
Triggers
Get new and updated objects
Configuration fields
- Object type dropdown
-
Select an object type to fetch.
- Emit behavior
-
Choose between Emit objects individually or Emit by page options.
- Field to poll
-
Used to select the field to poll (new or modified objects).
- Start time
-
Used to set the time to start retrieving events. (String, optional)
- End time
-
When provided, do not fetch records modified after this time. (String, optional, defaults to never)
- Size of polling page
-
Set the size of the fetched pages. (Optional, positive integer, max 100, defaults to 100)
- Single page per interval
-
Indicates that if the number of changed records exceeds the maximum number of results in a page, instead of fetching the next page at once, wait until the subsequent flow starts to fetch the next page.
Actions
Raw request
An action to call any Hubspot API endpoint.
Configuration fields
Throw Error on 404 Response (optional) Treat 404 HTTP responses as errors, defaults to false.
Input metadata
- URL
-
Path of the resource relative to the URL base (https://api.hubapi.com), required.
- Method
-
Allowed values GET, POST, PUT, PATCH, DELETE, required. HTTP verb to use in the request.
- Request Body
-
Body of the request to send
Upsert
An action to upsert (update/create) object in HubSpot
Configuration fields
- Object type
-
Object type for upserts like companies, contacts, deals, line items, or tickets.
- ID to Search On
-
Identifier to search objects like HubSpot ID or email. Use email for object type in the contacts.
Input metadata
Dynamically generated
For each custom file field, an object is generated to upload the custom file to populate that field. That object includes the following:
-
Attachment URL (URL containing the file contents to upload)
-
Folder path
-
File name
-
Charset hunch
-
Access
-
TTL
-
Overwrite
-
Duplicate validation strategy
-
Duplicate validation scope
We use files API for file uploading.
Lookup set of objects by unique criteria
An action to lookup object in HubSpot. Lookup set will ensure all the items in the set should be there; otherwise, it will throw an error.
Configuration fields
- Object type
-
Object type for lookups like companies, contacts, deals, line items, or tickets.
- ID to Search On
-
Identifier to search objects like HubSpot ID or email. Use email for object type in the contacts.
- Enable download attachments
-
Checkbox for enabling attachment download for the file field type.
Lookup object (at most one)
An action designed to look up one object by unique field.
Configuration fields
- Object type dropdown
-
Select an object type to lookup.
- ID to search on dropdown
-
Used to search a unique field.
- Allow ID to be omitted checkbox
-
Select to make the ID field optional (default: required).
- Allow zero results checkbox
-
Select to allow zero results. The system will emit an empty object {}; otherwise, the system will through an error in case of zero results.
- Enable download attachments
-
Checkbox for enabling attachment download for the file field type.
Lookup objects (plural)
An action to lookup objects in HubSpot.
Configuration fields
- Object Type dropdown
-
Select an object type to find.
- Behavior dropdown with options
-
Fetch all, fetch the page, emit individually, required.
- Enable download attachments
-
Checkbox for enabling attachment download for the file field type.
Input metadata
- Search Criteria Array
-
Combine each search term with an AND operator.
HubSpot supports up to three criteria |
Example: Records created after 2021-10-01T03:30:17.883Z
with property firstname containing Tony
:
["createdate GT 1633059017883", "firstname CONTAINS_TOKEN Tony"]
Supported operators:
OPERATOR | DESCRIPTION |
---|---|
EQ |
equal to |
NEQ |
not equal to |
LT |
less than |
LTE |
less than or equal to |
GT |
greater than |
GTE |
greater than or equal to |
HAS_PROPERTY |
has a property value |
NOT_HAS_PROPERTY |
does not have a property value |
CONTAINS_TOKEN |
contains token |
NOT_CONTAINS_TOKEN |
does not contain token |
If Fetch page is selected, additional metadata fields are:
- Page size
-
Number of records to retrieve. The limit is 100.
- Page number
-
Number of pages to skip.
- Order
-
Order direction, ASCENDING or DESCENDING
Order example:
createdate DESCENDING
Output metadata
- For the Fetch page
-
An object with:
-
Key results that have an array as their value.
-
Key totalCountOfMatchingResults containing the total number of results (not just on the page) matching the search criteria.
-
- For fetch all
-
An object with key *results that has an array as its value.
- For emit individually
-
Each object fills the entire message.
Create association
An action to create an association between object types.
Configuration fields
- From object type
-
Choose an object type to create an association.
- To object type
-
Choose an object type to which to associate.
Objects are not retrieved to associate dynamically. Read the HubSpot documentation to verify the possible association between selected objects. |
Remove association
An action to remove an association between object types.
Configuration fields
- From object type
-
Choose from which object to remove the association.
- To object type
-
Choose to which object to associate.
Objects are not retrieved dynamically to associate. Read the HubSpot documentation to verify the possible association between selected objects. |
Known limitations
-
HubSpot Rate Limits
-
The use of a timer (set to about 5 seconds) may increase performance when building a flow similar to:
Upsert object
→ anyLookup object(s)
while theEnable download attachments
feature is enabled. Uploading the file to HubSpot with theUpsert object
action can take considerable time; this may cause a404
error on lookup.