Skip to main content

I have a zap that either creates a deal (if it doesn’t already exist) or updates (if it exists) the properties of a deal in HubSpot. In many situations I need to blank out some deal properties in HubSpot because the updated data is blank for some fields. I know that I can use $$CLEAR$$ in the HubSpot Update Deal action, and that successfully blanks the fields in HubSpot. But I need to do this programmatically. I tried creating a Default Text action that made the default text $$CLEAR$$ if the property is empty, but that just resulted in the actual text “$$CLEAR$$” being passed to the HubSpot property. Is there a way to properly pass $$CLEAR$$ from a previous step to the HubSpot Update Deal action? 

Hi @lukeb 

To help us have proper context, post screenshots with how your Zap steps are outlined and configured, thanks.


Actions in question in the Zap:

 

Default text action (I also tried find/replace and spreadsheet-style formula actions with the same result):

 

Output of default text action used in update deal action:

 

The end result in HubSpot - instead of clearing the property, “$$CLEAR$$” is written to the property:

 


@lukeb 

You may want to try opening a ticket with Zapier Support for further troubleshooting: https://zapier.com/app/get-help

 


Thanks, I submitted a ticket


Following since I’m trying to do the same but with a date property in Hubspot


@Tom Schoorstra Zapier support confirmed this is a bug with the HubSpot integration, and they have filed the bug with HubSpot since HS created the integration. The workaround they suggested (that is working perfectly for me) is to use an API request action in Zapier to update the deal properties. 

You can map any Zapier value in the between the double quotes. If that field is empty, the request will simply contain "" which will clear out the field. If it is not empty, it will updated with the contents of that value accordingly. 

I’ve included how the action is setup in my Zap below. Hopefully this helps you and anyone else who was banging their head against the wall like me trying to figure this out! 

See https://knowledge.hubspot.com/properties/organize-and-export-properties#:~:text=on%20a%20record.-,In%20your%20HubSpot%20account%2C%20click%20the%20settings%20settings%20icon%20in,right%2C%20click%20Export%20all%20properties for an easy way to export all your property names from HubSpot into a CSV. This made the process much easier for me.

 

App: HubSpot
Event: API Request (Beta)

Step details
Api Docs Info: Empty
HTTP Method: PATCH
URL: https://api.hubapi.com/crm/v3/objects/deals/{deal_id}
Query String Parameters: Empty
Headers: Empty

Additional Request Headers

Accept application/json
Content-Type application/json

 

Body

{
"properties": {
"hubspot_property1": "{zapier_property1}",
"hubspot_property2": "",
"hubspot_dealname": "{zapier_dealname}"
}
}

 


Awesome! Thanks for your reply. I’ll go ahead and set it up through an API call then.

 

All the best,

 

Tom