Loop stops after first item
I read rows from supabase and want to loop through them, sending an sms.
My loop stops after the first item and marks the workflow as success.
According to the log, the 'Get Row' output, has 3 objects.
Any idea why it stops before processing all items?
Solution:Jump to solution
Hi @PascalM from your screenshot it seems that you have added extra brackets in the loop items editor. you can remove the other brackets [] as the Get Row data form Supabase is already an array.
4 Replies
AI Support Bot Information
<@707974306767962122> 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
Looping through rows and sending an SMS for each item should work as expected if properly configured. It seems like your workflow might have encountered an issue with node configuration or the structure. Here are some key points to check:
1. Check the Loop Node Configuration: Ensure that the loop node is correctly set up to process each item in the array returned by the 'Get Row' output.
2. Review the Logs: Logs can provide useful insights into why the loop stops prematurely. Check for any errors or warnings in the nodes within the loop.
3. Ensure Continuation: Make sure there is no conditional node that might break out of the loop after processing the first element.
4. Parallel Processing: Sometimes, setting nodes to run in parallel within the loop can cause unexpected behavior. Verify that nodes are configured for sequential processing if necessary.
5. Output Handling: Ensure that the output from the 'Get Row' is correctly formatted as an array and each object within the array is appropriately structured for the next node.
You can also reference the documentation for dealing with loops and conditional nodes in BuildShip workflows:
- Loop Nodes
- Branch Nodes
If the issue persists, provide more detail on your setup, or consider reaching out to BuildShip support via the in-app support feature.
BuildShip AI Support
Solution
Hi @PascalM from your screenshot it seems that you have added extra brackets in the loop items editor. you can remove the other brackets [] as the Get Row data form Supabase is already an array.
Hi @Gaurav Chadha
Thanks, that worked 🙂