pipedream icon indicating copy to clipboard operation
pipedream copied to clipboard

Support for branching (if / then) operation

Open dylburger opened this issue 5 years ago • 45 comments

Currently, workflows are a linear sequence of steps. I'd like support to branch a workflow in a conditional manner (if condition is true, run this step, else run this other step).

dylburger avatar Oct 23 '19 23:10 dylburger

One comment from Slack: "what id love to see is some kind of support of metadata in steps that's a simple condition, like: Condition: [ ] where you enter a value that gets evaluated at runtime. if true, the step executes. you then enter something like "steps.jira_ticket.assignee === 'jim'""

dylburger avatar Apr 15 '20 16:04 dylburger

Hello, are there any updates for this feature ? @dylburger

rugbbyli avatar Aug 24 '21 08:08 rugbbyli

@rugbbyli not yet but we’re still actively thinking about it

dylburger avatar Aug 24 '21 17:08 dylburger

@dylburger, I would love to see this. This is one of my biggest pain points with pipedream.

ThinkFar avatar Oct 01 '21 01:10 ThinkFar

Off the top of my head, this is my only request that would make my life so much easiest. Pipedream is a solid product but having conditional steps would be a game changer!

kpetrillo avatar Dec 29 '21 14:12 kpetrillo

Would it be possible to have some sort of "goto step #X if condition is true" block? I don't know how complex that would be to implement, but it seems in line with what other steps can do.

essential-randomness avatar Jan 03 '22 04:01 essential-randomness

@essential-randomness That's great feedback and yes, this would be possible with the implementation we envision for this.

dylburger avatar Jan 04 '22 04:01 dylburger

no update yet? I would be great to have conditionals steps so we can perform different actions with diff integrations depending on the trigger

giondo avatar Apr 08 '22 09:04 giondo

@giondo No update on this yet, but it's near the top of our backlog after we finish #220 (currently our #1 most-requested feature).

dylburger avatar Apr 11 '22 02:04 dylburger

@dylburger +1 I'm doing multiple flows right now to handle this and it's driving me nuts. Thanks!

EnGlamdring avatar Apr 11 '22 15:04 EnGlamdring

I'd like to keep logic of different branches of a workflow separated and clean so that it's easier to track and debug (rather than managing branching in the code itself and then having if-else statement in every subsequent block)

devang-kredx avatar Apr 13 '22 18:04 devang-kredx

We would love this feature.

Even the ability to have a simple condition to skip a step.

We have some workflows that have 3 or 4 Slack steps but we aren't able to support proper testing which would require having the workflow use a test Slack account.

Currently the only way to do it is to either have two copies of the one workflow or duplicate and convert all the Slack steps into code steps and then have an if statement around each code block to only run it if the test flag is true for the test steps and false for the live steps.

I guess an alternative would be some kind of condition which determines which account to use for the auths object.

This would mean allowing multiple Slack accounts to be connected to a single step.

jonparker avatar May 06 '22 23:05 jonparker

I guess an alternative would be some kind of condition which determines which account to use for the auths object. This would mean allowing multiple Slack accounts to be connected to a single step.

@jonparker Great idea but from my point of view, this is indenpendent from this issue. You want the apps account props to be seen as pointers to an account. You could then change the pointer in the previous steps so that Slack account A or B is used to send a message.

When this issue will be closed, you can do a simple if condition with identical slack actions on each branch but different accounts.

For now, I recommend you to open a new issue.

LucBerge avatar Nov 07 '22 14:11 LucBerge

Hi @LucBerge , I am no longer using Pipedream in that team. I am only using it for small personal projects.

jonparker avatar Nov 07 '22 14:11 jonparker

is there any update on this feature?

yangcheng avatar Nov 22 '22 07:11 yangcheng

very important feature!

the "Router" module in Integromat / Make is a great reference.

one way you could improve on it is by adding sequencing to the router steps so it can either complete the branches sequentially, or you could do it synchronously

modernmusician avatar Nov 24 '22 01:11 modernmusician

Very Essential is also branching on an error from the previous step. So I can use more standards block instead of coding the error handling in each step individually in node.js or other languages. Thanks for considering.

myonara avatar Dec 12 '22 15:12 myonara

Very much waiting for this feature to be implemented, upvoting! :)

b2storefront avatar Dec 19 '22 01:12 b2storefront

Kinda of thinking of replacing pipedream now with my website because of this. I keep getting errors because the source was accessed via a GET request and not POST so my parsing step returns nothing to my Discord webhook step.

elibroftw avatar Dec 26 '22 23:12 elibroftw

agree, . If I have to write code instead of releasing the power to non-engineers, I'd go with lambda or cloudflare workers, way cheaper.

yangcheng avatar Dec 28 '22 02:12 yangcheng

I think this is an extremely important feature. And now this is also my pain point when using Pipedream. Currently I'm working on using Microsoft Power Automate. To set conditions and switch each case will send requests to each flow separately in Pipedream. However, the trade-off is a 1s delay for each trigger. It would be great if Pipedream adds this feature soon to compete with Microsoft Power Automate.

image

s1248 avatar Jan 17 '23 10:01 s1248

Hi Pipedream, why is branching still not there? This thread dates back to mid 2021, when you were "actively thinking about it". We need a bit more speed in feature delivery. For the other feature I am waiting for (loop over an array) https://github.com/PipedreamHQ/pipedream/issues/193#issuecomment-1303208624 it is now three years with no progress.

bacherjo avatar Jan 18 '23 12:01 bacherjo

Hi, I also agree with the request to add "router" to the workflow. We will be happy to receive updates.

rrbbtalnorth avatar Feb 07 '23 09:02 rrbbtalnorth

also wondering on the status of this feature

amolxyz avatar Mar 14 '23 00:03 amolxyz

Is the alternative to use other workflows? Like, the work starts on one workflow and depending on what happens sends the information to another workflow, and so it starts to branch out. I'm gonna give that a try, but it seems difficult to visualize.

fev4 avatar Mar 14 '23 21:03 fev4

+1 following

acreconsulting avatar Mar 15 '23 19:03 acreconsulting

It would also be great if the branches can be executed in parallel as well.

tonyxiao avatar Mar 19 '23 20:03 tonyxiao

Is this an upcoming feature? This would be really helpful

wwc-development avatar Mar 20 '23 00:03 wwc-development

+1 to this feature - would love to see it. While it does seem like there is some pretty incredible stuff that can be done by chaining workflows together as well, just not sure the UX is there to make this feature irrelevant.

drakeballew avatar Apr 14 '23 15:04 drakeballew

has been more than 3 years and no update, I am moving all my pipedream workflow to cloudflare workers.

yangcheng avatar Apr 25 '23 06:04 yangcheng