How Can We Implement Conditional Execution of Constructed Steps in Pi?

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

:point_up_2: maybe someone can help us here. Pi is suggesting to have a step that includes if statement with code from steps, but I want conditional execution of steps (actually constructed steps, not their code representation, if that makes sense)

You want branching, which the team is starting to work on — this is one of the top feature requests from the community Support for branching (if / then) operation · Issue #216 · PipedreamHQ/pipedream · GitHub

A lot of that functionality can indeed be achieved using code steps, but you’re right that the gap is that you can’t use the pre-built actions.

Branching… that’s the term I was looking for :slightly_smiling_face:
Yea given that the step I want to conditionally execute is a Notion database query, I think I can construct it with code.
My use case is asking GPT a question about my data and for it to structure a call to my Notion to get it and respond back with it.
But not every question is a data question, so I need the Notion call executed only when GPT says it needs to.

Right, cool. Yea, it’s a totally logical feature that is often a pain to work around!

Ok, just subscribed to that issue, but for now will work around. Thanks!