In this article

Overview

Use this Snap to retrieve data objects from HubSpot. Learn more about HubSpot APIs from HubSpot Documentation.

Prerequisites

None.

Support for Ultra Pipelines

Works in Ultra Pipelines

Limitations and Known Issues

None.

Snap Views

FormatTypeNumber of ViewsExamples of Upstream and Downstream SnapsDescription
Input 

Document

  • Min: 0
  • Max: 1
  • Mapper
  • Copy
  • CSV Parser
A document containing details with which to identify the data object to retrieve from HubSpot.
Output

Document

  • Min: 1
  • Max: 1
  • HubSpot Update
  • CSV Formatter + File Writer
  • Copy

A document containing details of the data object retrieved from HubSpot.

Snap Settings

Field NameField TypeDescription

Label

Default Value: HubSpot Read
Example: 
Read Employee Details

String

Entity


Default Value:
N/A
Example: 
Company

String

Required. Select the data object to read.

Action


Default Value:
N/A
Example: 
Get all companies

String

Required. Select the read-action to perform on the entity selected above. Click  to see the list of supported actions. 

Required parameters



Use this field set to enable the Snap to perform a specific action.

Parameter


Default Value:
N/A
Example: 
company.id

String

Specify the names of the required parameters. Click  to see the list of supported parameters.

Value


Default Value: 
N/A
Example: 
company.id

Multiple

Specify the values of the required parameters. The data type of this field depends on the specified parameter.

Optional parameters

Specify the optional parameters for a specific action. Specify each parameter in a separate row.


Parameter


Default Value:
N/A
Example: 
properties

String

Specify the names of the optional parameters. Click  to see the list of supported parameters.



Value

Default Value: N/A
Example
:name

Multiple

Specify the values for optional parameters. The data type of this field depends on the specified parameter.

Filter parameters




This property enables you to filter the results from the API response based on logical operations. 


Parameter


Default Value:
N/A
Example: 
email

String

Specify the system parameter $filter fields to be included in the output.

Operator


Default Value: 
Like
Example: 
contains

String

Specify the comparison operator for the system parameter $filter.

Value


Default Value:
N/A
Example: @example.com

Multiple

Enter the values of the specified input $filter fields. The data type of this field depends on the specified parameter.

Order records by




Select the order of the specified parameters. The order types to be selected are either ascending or descending.

Not all parameters support sorting. Refer to HubSpot API Documentation for more information.


Parameter


Default Value:
N/A
Example: 
city

String

Enter the parameter for which to specify the order.

Value

Default Value: ASCENDING
Example: 
DESCENDING

String

Select one of the following orders in which to sort the specified parameter:

  • ASCENDING
  • DESCENDING

Advanced options

Use this section of Snap Settings to specify options to control the number of records in the output. This section comprises the following fields:

  • Output entry offset
  • Output entry limit
  • Automatic pagination

Output entry offset


Default Value: 
0
Example: 
1

Integer

Specify the number of records to skip during the read operation. Leave it empty so as not to skip any records.

Output entry limit


Default Value: 
100
Example: 
30

Integer

Select the number of records to fetch in the read operation. Leave it empty to retrieve the default number of records,

Automatic pagination


Default Value: 
Selected

Checkbox

Select this checkbox to enable the Snap to return all the records in the output. By default, the HubSpot Read Snap returns the maximum number of records per page from HubSpot based on the entity. The remaining records, if any, display in the subsequent pages.

If you deselect the Automatic pagination checkbox, the Snap returns only the records of the first page in the output.

Learn more about Usage of Automatic pagination.

Connection timeout


Default Value: 
30
Example
:30

Integer

Required. Enter the connection timeout duration of seconds.

Number of retries


Default Value: 
3
Example:
 3

Integer

Required. Enter the maximum number of re-connection attempts in case of a failure or timeout.

Retry interval (seconds)


Default Value:
N/A
Example: 
3

Integer

Required. Enter the interval in seconds between reconnections attempts.

Snap Execution


Default Value: 
Validate & Execute
Example:
 Execute only

String

Indicates how the Snap must be executed. Available options are:

  • Validate & Execute: Performs limited execution of the Snap (up to 50 records) during Pipeline validation; performs full execution of the Snap (unlimited records) during Pipeline execution.
  • Execute only: Performs full execution of the Snap during Pipeline execution; does not execute the Snap during Pipeline validation.
  • Disabled: Disables the Snap and, by extension, its downstream Snaps.

Troubleshooting

ErrorReasonResolution

Missing required parameters.

There is a required parameter that was not provided.

Verify whether all required parameters are configured.

Additional Information

Usage of Automatic pagination

The response for auto pagination is an array of response batches where each batch contains the default number of records returned by the HubSpot API for the specific entity. By default, the HubSpot Read Snap returns the maximum number of records per page in the response from HubSpot based on the entity. The remaining records, if any, display in the subsequent pages.

General Behavior

The following behaviors of HubSpot are useful to know in order to easily use the read Snap:

Example

Retrieving Company Data

We want to retrieve records of the Company entity in HubSpot.  This Pipeline demonstrates how we can use the HubSpot Read Snap to accomplish this task.

We configure the HubSpot Read Snap to read the entity Company with the Get all companies action as shown below:

A successful validation or execution of the Snap gives the following output preview, showing the query results.

We format the above output as a JSON file using the JSON Formatter Snap and write the JSON Formatter Snap's output into a local file using the File Writer Snap. 

To view the newly-created file, we SSH to the target directory and open the newly-created file.

The following picture shows the preview of the result output JSON file.

Download this Pipeline.

Downloads

  1. Download and import the Pipeline into SnapLogic.
  2. Configure Snap accounts as applicable.
  3. Provide Pipeline parameters as applicable.



Edit the Excerpt Include macro below to link to the Snap Pack page for this Snap page. Ensure that the heading Snap Pack History is not within the Snap Pack's history Excerpt. 


See Also

Provide links to the endpoint's official documentation, any relevant or related internal documentation, and any other links you have referred to on this page. Care should be taken when referencing external sites/documentation that it is an official site/documentation. Do not refer to forums such as stackoverflow.