Best answer

Search for Hubspot deal with a negative term (When field does not match X value)

  • 14 March 2022
  • 7 replies
  • 66 views

I’m looking for a way to search for a deal as long as the deal does not include a certain value in a certain property. 

icon

Best answer by Troy Tessalone 14 March 2022, 19:19

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 @Lee-on Pedahzur 

Good question.

Are you able to outline a specific example for us to have more context about what you are trying to achieve with the HubSpot Find Deal Zap step?

Hi @Troy Tessalone - Thanks for the quick reply!

Let me try - Assume I have a deal property called Property that can have 3 values: A, B, C and I want to find a deal that doesn’t have C as the value for that property, and I’m indifferent about whether the value is A or B such that I dont want to specify that it needs to be A or B. Is there a syntax that will give me a deal with Property not equal to C?

 

Thanks!

Userlevel 7
Badge +14

@Lee-on Pedahzur

Thanks for the context.

Filters can be used to screen data in Zaps: https://zapier.com/apps/filter/help

e.g. Value does not contain C

Would that work?

Unfortunately a filter won’t work for the use case because if there are 2 deals that match the other search criteria, one with an A value and one with a C value, and the C value was created before the A value deal, then the search will return the C value deal, not the A value deal, and the filter will prevent the rest of the tasks to execute even though there is an A value deal available. If I could explicitly search with a negation (NOT C) then the search should bring in the deal with value A. 

Appreciate your help here, could have probably wrote out the scenario more clearly from the get go.  

Userlevel 7
Badge +14

@Lee-on Pedahzur

If there are only 3 possible values then try this Zap step execution:

First, search for A and if not found then search for B, then determine how the Zap should handle the results.

You can achieve this using Paths in the Zaps: https://zapier.com/paths

 

EXAMPLE

Path A = value of A exists

Path B = value of A does not exist, so check for value of B

@Troy Tessalone Thanks again for the help here. There could be multiple values beyond that and they could also change + needing to recreate the steps afterwards for each value would also be a drag to maintain. Sounds like there isn’t anything I can do with just searching for anything but a certain value so I think my best alternative is to have a custom code zap that calls the API directly and then iterates on the results to find what I’m looking for.

Userlevel 7
Badge +14

@Lee-on Pedahzur

Yes, you can use app APIs in Zaps with the Webhooks app as an action step: https://zapier.com/apps/webhook/help

HubSpot API: https://developers.hubspot.com/docs/api/crm/search

Check out this help article for how to Filter search results: https://developers.hubspot.com/docs/api/crm/search#filter-search-results