Best answer

Adding instead of updating row in SQL always runs even if found

  • 11 October 2021
  • 11 replies
  • 100 views

I am updating data in SQL from hubspot.  The update works fine and runs as it should.  However, it also adds a new row even though I have set up a filter to

“Only Continue if _zap_search_was_found_status  true” = (Boolean) is False

Is that logic correct? It should not run if a row was found. 

 

Or is the next step (the Add new Row to SQL) always running because I haven’t properly told it to not continue?

 

Thx for any help

.

icon

Best answer by christina.d 7 June 2022, 00:52

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.

11 replies

Userlevel 7
Badge +14

Hi @bgunning 

If you are manually testing the Zap steps, then the SQL step will process when you test.

Try turning the Zap ON and testing, then check your Zap Runs to see how the Zap processed: https://zapier.com/app/history/

Hi Troy - thx for the response.  Yes when I turn it on it is sending new rows for every updated user to my SQL table, instead of just updating the existing ones.   Here is how my steps look. https://ibb.co/Ss1YJVc

Thank you

Userlevel 7
Badge +14

@bgunning 

Try changing this to: Zap Search was Found Status ‘contains’ “false”

 

 

Hi Troy - I did try it, but no it didn’t work.  And I am successfully using the Bolean is False in other Zaps.  I just can’t figure out what is different about the 6 zaps I have that update Contact data, vs the ones that run correctly on Company data. Any other idea on what is wrong with my zap filters?

Thanks for any help.

Userlevel 7
Badge +14

@bgunning 

Try turning the Zap ON and testing, then check your Zap Runs to see how the Zap processed: https://zapier.com/app/history/

For each Zap step you can see the DATA IN/OUT.

Then you should be able to determine if the Filter condition is returning TRUE or FALSE.

Hi - the zap is on, and it keeps sending dups to my SQL table. 

The step  correctly shows “_zap_search_was_found_status: false” when it finds a record in SQL (the logic is backwards which bugs me, it should be true but the step says “Should this step be considered a "success" when nothing is found?” 

So then I have the filter with “only continue if”  “Zap Search was Found Status ‘contains’ “false””

and it still sends a new record to SQL. shouldn’t it stop there?

Userlevel 7
Badge +14

@bgunning 

Perhaps you can post screenshots of the DATA IN/OUT from the applicable steps.

 

The Filter step is used to let the Zap continue when the conditions are met.

 

If NO record is found, then NO data should be returned related to the record.

 

Taking your example…

Results from search: _zap_search_was_found_status: false (this means NO record was found)

Filter step criteria:

Results would be the Zap Run passes the Filter step and continues to the next action step.

 

If you’d like Zapier Support to look into this further you can open a ticket here: https://zapier.com/app/get-help

Hi Troy - are you sure about the false? It says in the Action “Should this step be considered a "success" when nothing is found?” Therefore, if no row is found then it is True, not False.  Correct?

 

see my image - step 7. I did ask for Zapier support and they just send me links to the documentation.

Userlevel 7
Badge +14

@bgunning

To clarify, there are 2 different settings.

 

Zap Found = True/False

Will be indicated regardless.

Depending on the Zap logic, you may want the Zap to continue if no results was returned.

 

“Should this step be considered a "success" when nothing is found?”

This indicates if the Zap should continue if NO result is returned (aka no Zap Found = False).

 

To use an example…

If the results for Zap Found = FALSE, AND the Zap setting for Continue If Not Found = TRUE, then when the following Filter step goes to evaluate it will evaluate the Zap Found Status (which would be FALSE) in this case, and pass the Filter conditions.

Hi - that did clear up some confusion I had on the True/False and then the success.  Didn’t realize they were separate.  I’ll troubleshoot from here. Thank you for your time!

Userlevel 7
Badge +9

Hi friends! I wanted to pop in and summarize some of Troy’s responses for anyone following along: 

@bgunning

Try changing this to: Zap Search was Found Status ‘contains’ “false”

 

 

 

The Filter step is used to let the Zap continue when the conditions are met.

 

If NO record is found, then NO data should be returned related to the record.

 

Taking your example…

Results from search: _zap_search_was_found_status: false (this means NO record was found)

Filter step criteria:

Results would be the Zap Run passes the Filter step and continues to the next action step.

 

For some additional context on the True/False logic: 

@bgunning

To clarify, there are 2 different settings.

 

Zap Found = True/False

Will be indicated regardless.

Depending on the Zap logic, you may want the Zap to continue if no results was returned.

 

“Should this step be considered a "success" when nothing is found?”

This indicates if the Zap should continue if NO result is returned (aka no Zap Found = False).

 

To use an example…

If the results for Zap Found = FALSE, AND the Zap setting for Continue If Not Found = TRUE, then when the following Filter step goes to evaluate it will evaluate the Zap Found Status (which would be FALSE) in this case, and pass the Filter conditions.

I hope this helps!