Best answer

Passing $$CLEAR$$ as the output of an action to clear a field in HubSpot

  • 8 February 2024
  • 7 replies
  • 101 views

Userlevel 1

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? 

icon

Best answer by lukeb 17 February 2024, 23:54

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

7 replies

Userlevel 7
Badge +14

Hi @lukeb 

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

Userlevel 1

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:

 

Userlevel 7
Badge +14

@lukeb 

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

 

Userlevel 1

Thanks, I submitted a ticket

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

Userlevel 1

@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