HubSpot Delete

In this article

Overview

Use this Snap to remove specific data objects from HubSpot. For more information about HubSpot APIs, see HubSpot Documentation.

Overview.png

Prerequisites

None.

Support for Ultra Pipelines

Works in Ultra Pipelines

See Snap Support for Ultra Pipelines.

Limitations

None.

Known Issues

None.

Snap Views

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Type

Format

Number of Views

Examples of Upstream and Downstream Snaps

Description

Input 

Document

  • Min:0

  • Max:1

  • HubSpot Read

  • Mapper

  • Copy

A document containing key/identifier of the data object to delete.

Output

Document

  • Min:0

  • Max:1

  • Mapper

  • Copy

  • Email Sender

A document containing the entity ID and the status of the delete operation.

Error

Error handling is a generic way to handle errors without losing data or failing the Snap execution. You can handle the errors that the Snap might encounter when running the pipeline by choosing one of the following options from the When errors occur list under the Views tab:

  • Stop Pipeline Execution: Stops the current Pipeline execution if the Snap encounters an error.

  • Discard Error Data and Continue: Ignores the error, discards that record, and continues with the remaining records.

  • Route Error Data to Error View: Routes the error data to an error view without stopping the Snap execution.

Learn more about Error handling in Pipelines.

Snap Settings

  • Asterisk (*): Indicates a mandatory field.

  • Suggestion icon (): Indicates a list that is dynamically populated based on the configuration.

  • Expression icon ( ): Indicates the value is an expression (if enabled) or a static value (if disabled). Learn more about Using Expressions in SnapLogic.

  • Add icon ( ): Indicates that you can add fields in the fieldset.

  • Remove icon (): Indicates that you can remove fields from the fieldset.

  • Upload icon ( ): Indicates that you can upload files.

Field Name

Field Type

Description

Field Name

Field Type

Description

Label*

 

Default Value: HubSpot Delete
Example: N/A

String

Specify a name for the Snap. You can modify this to be more specific, especially if you have more than one of the same Snap in your pipeline.

Entity*

 

Default Value: Association
Example: Company

String

Select the data object to delete.

Action*

 

Default Value: N/A
Example: Delete a company

String

Select the delete-action to perform on the entity selected above. Click the Suggestion icon 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 the Suggestion icon to see the list of supported parameters.

Value

 

Default Value: N/A
Example: 123561234

Multiple

Specify the values of the required parameters. The data type of this field depends on what parameter name you selected or entered which can be String, Integer, Boolean, etc.

Connection timeout*

 

Default Value: 30
Example: 30

Integer

Specify the time in seconds for the Snap to wait before terminating the request because of a failure to establish a connection to the target service.

Number of retries*

 

Default Value: 0
Example: 0

Integer

Specify the maximum number of retry attempts to make if a connection failure or timeout occurs.

Retry interval (seconds)*

 

Default Value: 0
Example: 0

Integer

Specify the number of seconds for which the Snap must wait before attempting recovery from a network failure.

Retry policy

 

Default Value: Connection errors
Example: Connection and API limit exceeded errors (429)

Dropdown list

Choose the retry policy for connection and error responses. The available options are:

  • Connection errors: Select this option when the client fails to establish a secure connection to the server.

  • Connection and API limit exceeded errors (429): Select this option when the 10-second or daily limit is exceeded.

Snap Execution

 

Default Value: Execute only
Example: Validate & Execute

Dropdown list

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

Error

Reason

Resolution

Error

Reason

Resolution

Missing required parameters.

There is a required parameter that was not provided.

Verify whether all required parameters are configured.

You have reached your ten secondly rolling limit.

There are too many requests to REST endpoint.

Select Connection and API limit exceeded (429) errors in the Retry Policy and adjust the values for “Number of retries” and “Retry interval”.

You have reached your daily limit.

There are too many requests to REST endpoint.

The maximum number of daily requests has been reached, and no further requests can be made until it resets. For more information refer to API Meters.

Examples

Deleting a Company from HubSpot

We want to delete a company from the HubSpot instance. This Pipeline demonstrates how we can use the HubSpot Delete Snap to accomplish this task:

We do not need any Snap other than the HubSpot Delete Snap to delete an entity. However, we want to write the delete confirmation output by the HubSpot Delete Snap into a local JSON file. That is why we use the JSON Formatter and File Writer Snap in this example. If there are multiple entities to delete, we can pass the entities' identifier through upstream Snaps or as a Pipeline parameter. In that case, we can add Snaps such as Mapper, File Reader, or Copy, upstream of the HubSpot Delete Snap.

We configure the HubSpot Delete Snap with the Company entity and Delete a company action. We also provide the entity's identifier (company_id) as a required parameter.

01_Delete.png

Upon execution, the HubSpot Delete Snap deletes the specified entity and outputs a confirmation of the same.

02_Delete output.png

Since we want to write this output into a local file for record-keeping, we use a combination of the JSON Formatter and File Writer Snaps downstream of the HubSpot Delete Snap.  The screenshot below shows the configuration of the File Writer Snap:

03_File writer.png

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

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

Preview.png

Downloads

  1. Download and import the Pipeline into SnapLogic.

  2. Configure Snap accounts as applicable.

  3. Furnish Pipeline parameters as applicable.

  File Modified

File Hubspot_DeleteCompany.slp

Apr 23, 2024 by Irfan Khan

 


See Also

 

Have feedback? Email helpdesk@rojoconsultancy.com © Rojo Consultancy