How do I add a filter to my step so the workflow only continues if something is not yet in Google sheets?

This topic was automatically generated from Slack. You can find the original thread here.

Krish Visram : How would I be able to add a filter so the workflow only continues if something is not yet in a Google Sheet. If that specified thing is in the Google Sheet, I want the workflow to stop. Thanks

Dylan Sather (Pipedream) : re: the Google sheets step, you can add a new step and search for “Google Sheets”, and you’ll see a number of actions for finding a row or retrieving a range of values.

Then check out https://docs.pipedream.com/workflows/steps/code/#end . $end allows you to end your workflow early, with an optional message. So you should be able to run $end conditionally, based on the absence of the data you’re looking for.

Let me know if that helps

@dylburger, not too sure what I am doing wrong but I get a $end is not defined error. Could you advise?

Screenshot from one of the logs:

Screenshot from the step:

@aruns Take a look at these docs.

$end was only available in a previous version of our workflow builder. You’re on the new version, so you’ll want to reference these docs: https://pipedream.com/docs-v2.

Let me know if that helps!

1 Like

That helps, thanks @dylburger!