This topic was automatically generated from Slack. You can find the original thread here.
I agree. I mainly use code-blocks, so I’ve gotten around this by just building the control logic into the code itself. E.g., instead of having an if/else pipedream block, and executing different code based on each, I just have a singular code block and have the if/else in there.
If you have a non custom-code-block you need to run conditionally, the clunky workaround is to create a workflow with a webhook trigger for e.g. just that block. You can then trigger that workflow via a webhook you craft in a custom-code-block that is sandwiched in the logic you care about.
I may have phrased this confusingly.
Example: say you have 3 blocks:
• [Block 1: control flow pipedream block ]
◦ PATH A (if condition A met)
︎ [Block 2: run some pre-built (non-code) block]
◦ PATH B (if condition B met)
︎ [Block 3: run some custom code in a code-block]
Instead you do something like
• New pipedream work flow that is a webhook triggering Block 2.
• In your main/current workflow, you just have one code block which does the following:
◦ Logic in code to check A/B path
◦ If A, in code, trigger the webhook for the workflow containing [Block 2]
◦ If B, execute Block 3 code