Guidance on Terminating Repeat Node at a Specific Condition in Buildship
I need guidance on how to terminate the repeat node when a particular condition is met. Could you please provide steps or best practices for setting this up correctly? If there are any specific settings, expressions, or nodes (e.g., a conditional break) that I should use to achieve this, I’d appreciate detailed instructions or examples.
For context, I’m working on a workflow where the repeat node should stop iterating once a specific condition is satisfied, but I’m unsure how to implement this effectively.

4 Replies
AI Support Bot Information
<@1374738993958359092> you can react on the relevant answer (message) with a ✅ in this thread when you think it has been solved, by the bot or by a human!
Anyone can react on this message with a ❌ if the GPT bot is unhelpful or hallucinating answers.
Please note: Team members will review and answer the questions on best efforts basis.
AI Response
It seems there is no specific template for setting up a repeat node to terminate based on a condition within the current database of templates and FAQs. However, you can create a conditional check within your workflow using nodes available in BuildShip. Here's a general approach you can take:
1. Conditional Check Node: Use a node (such as an IF/ELSE node) to evaluate whether the condition to terminate the loop has been met. This node will be responsible for checking the criterion you set for termination.
2. Repeat/Loop Node: Ensure your loop node has a built-in condition check. Some platforms allow for "While Loop" or "Until Loop," where you can specify a condition for continuation or termination.
3. Combine with Logic Control Nodes: Use additional logic control nodes that can break out of the loop when the termination condition is fulfilled. This could be a combination of branching nodes to direct the workflow based on the evaluation of your conditional node.
4. Specific Nodes or Expressions: If there are specific nodes for breaking out of loops early (like 'Break' or 'Exit'), ensure to use them in conjunction with your condition check.
5. Custom Approach: If no direct node exists, consider scripting a custom component or using APIs that implement the looping control you need.
For real examples or more specific guidance, it might be beneficial to look at existing detailed tutorials or reach out to BuildShip in-app support for further assistance or guidance on best practices specific to your workflow requirements. You can also consider checking the documentation on node usage here.
BuildShip AI Support
If there needs to be a condition why not filter the array first and create a new array where all items meet the condition and process that as a loop?
Hi @AKGDEV7 currently breaking a loop or repeat isn't supported, we have this on our roadmap. You can consider Chris's workaround or also add a branch with throw error when the condition is not met.