If this, then that - how to?

Hey guys,
the branche piece asks for a condition that is true or false. But how does it work if I want to query a value and I have different options for it.

Process 1 if value X equals “red”.
Process 2, if value X equals "blue
Process 3, if value X equals "yellow

How do I create such a query in ActivePieces?

Hi Ben, Can you provide a screenshot showing where you have difficulties understanding?

Hey kanarelo,
thanks for your reply.

Let me explain the situation briefly. I receive data via a webhook. Depending on the values, I want to execute an individual http request. For this, I need to retrieve a value from the webhook’s data and store the condition somehow. But the branch piece only gives me the option to check one or more values for true or false. I attached you a screenshot that shows what I would actually need. The check for a condition and an individual subsequent process for EACH of the 3 possible cases.

Do you understand what I mean?
My question is actually basically just how to implement what is drawn in green in the screenshot with Activepieces?


its not so complicated.

You have to picture this like a ‘waterfall’, the same way we would do it in grading school marks

if (m >= 90) {
    return "A"
if (m >= 80) {
    return "B"
if (m >= 70) {
    return "C"
if (m >= 60) {
    return "D"
else {
    return "pass"

But be careful with large branches, your flow might hang if it gets too complicated

Let me know if I lost you or there is something wrong

I already thought of this possibility, I just assumed that there is probably another more elegant solution.
But then I solve it like this. Thank you for your help :slight_smile:

Haha, don’t overthink it… AP is at its early stages, it will get better with time.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.