Conditional If Else to start specific actions

I’m working the google contacts. I want to create a contact if it does not exist. I want to update the contact if it does exist. How can I run different built-in actions based on the the results of a conditional?

Right now your best best might be to trigger separate workflows based on the result of conditions in a code step.

Coming from Zapier, I’m shocked that this is not built in, but I was able to get there by adding an if statement in a node code step to check a conditional, and trigger a new workflow if the condition is met. After, I terminate the current workflow so only the new one keeps running. Not a fan of how hacky it is, but hopefully pipedream can add this basic functionality soon :slight_smile:

There is a filter step available, which pretty much does the same thing as Zapier.

I thought you needed something like branching, which would require separate workflows.

Filter is not ideal for some cases cuz it pauses the workflow for some conditions, not continuing different actions…

Filter does not pause the workflow. Delay pauses the workflow.

Filter allows to conditionally end or continue a workflow execution based on a condition.

image
image

Sorry for my wording.
The thing is that we want to take different actions within the workflow based on certain conditions.
I don’t think Filter is for this purpose.

Right, if you want to branch one workflow into multiple “paths”, the only way to do so right now is to call separate workflows for each path based on some conditions in a code step.

Otherwise, Pipedream is also actively working on branching & looping (“control flow”). It is an upcoming feature. There’s a GitHub issue for it here.

You can also sign up for the beta here.

2 Likes

Thanks @mroy
I will definitely sign up for the beta testing :tada:
Looking forward to it!

If you’re tinkering with Google Contacts, the go-to move is diving into Google Apps Script. Wrap your actions in a simple ‘if’ statement, check if the contact exists, and toggle between creating and updating based on that.

1 Like