Hello everyone, I am new to ActivePieces, but I have an important question,
I am currently using ActivePieces and also ODIN, which uses ActivePieces from behind, but I have a question.
Let me put you in situation:
I have a workflow in which when a new row is entered in Google Sheets (a text), it develops a series of validation steps and ends up analyzing by means of a Google Sheets formula : LENB(XXXXX) to count the characters of the previously entered text.
Based on this Google Sheets formula, a Branch is performed to determine TRUE (if the LENB result is between 50-70) or FALSE (if the LENB result is NOT between 50-70).
In the affirmative case, it should just run UPDATE from Google Sheets and finish.
The problem is in the negative case, you must generate through ODIN (it is the same if you use ChatGPT or OpenAI, it is the same case) a new text, to later re-analyze it with the LENB formula.
And again we go back to the Branch with the same TRUE and FALSE.
I was thinking of using a LOOP since the result we are looking for is always TRUE, then theoretically if the text generated by IA does not meet the requirements of LENB, should re-generate another text until it meets the requirements LENB.
The problem is that I don’t know how to tell the LOOP when to stop, that is to say, how can I explain to the LOOP that it must stop when once generated the new AI text the result of the BRANCH is TRUE, I don’t know if I explain correctly.
If someone can help me, I would appreciate it very much.
As I say ODIN is 100% based on ActivePieces, so for the demonstration I could also realize the workflow in ActivePieces.
I leave some images to exemplify the workflow.
just to get your problem clearly, you have a condition within your loop in which you want to stop the flow, right?
If so just add your branch and inside the true branch add an http step and use the return response action, it will end your flow.
It looks like you’re trying to do something similar to repeating a process until condition is met. One way to do this is by moving the part you want to repeat to another flow with webhook trigger.
Within this flow, towards the end, create a branch to determine whether to repeat the flow. If the decision is to repeat, you can trigger the flow using an HTTP trigger, as it has a webhook URL.
Another way is to create a loop that repeats a certain number of times, like 20. Each time it repeats, check if the condition you want is met. If it is, the process won’t continue. If not, it will repeat again. This method will repeat up to 20 times at most, but if the condition is met, the inside steps will be skipped
For the second way “Another way is to create a loop that repeats a certain number of times, like 20. Each time it repeats, check if the condition you want is met. If it is, the process won’t continue. If not, it will repeat again. This method will repeat up to 20 times at most, but if the condition is met, the inside steps will be skipped”
Can you share a screenshot of What I need to do with the current loop i have?