Hi,
Thank you for the detailed explanation.
I wasn't aware of the Send Notification invocation limit, and that explains why the loop was consistently stopping after a couple of iterations without any clear error. I did have the success paths wired, but I didn't fully account for the failure path being triggered due to the rate limit, which would have caused the workflow to terminate silently.
Based on your suggestion, I'm going to change the approach and simplify the loop logic:
- Remove the Send Notification action from inside the loop
- Use a Decision to check if queueId exists on the current participant
- If found, set State.queueId and use Exit Loop
- If not, use Next Loop to continue
- Ensure all paths correctly lead to either Next Loop or Exit Loop
This approach is definitely cleaner and more efficient since I only need the first valid queueId, rather than iterating through everything.
I'll implement this and test it out - really appreciate the guidance!
------------------------------
Phaneendra
Technical Solutions Consultant
------------------------------
Original Message:
Sent: 05-04-2026 09:41
From: Cameron Tomlin
Subject: Workflow Loop only iterates first 2 items (0,1) - not continuing despite Next Loop
Hello Phaneendra,
I believe what you are hitting it the send notification action has a built in rate limit of 3 successful invocations per workflow execution. When the Send Notification action is successfully invoked 3 times within the same workflow execution, any subsequent invocations automatically take the failure path with an errorType of "ActionInvocationLimitExceeded". Since you're running a loop with Send Notification for debugging (iterations 0 and 1), and if your failure path is not connected or handled, the workflow will simply stop execution without errors.
My recommendations, the first being to add the failure output path to see why its stopping. If the failure path is not connected, the workflow execution will terminate silently when it encounters a failure scenario.
My next recommendation, since you're trying to extract the first available queueId from participants, you should:
- Remove the Send Notification action from your loop debugging
- Use a Decision action inside the loop to check if queueId exists:
- Yes path: Set a variable with the queueId, then use Exit Loop to break out
- No path: Use Next Loop to continue to the next participant
- Ensure all paths connect to either Next Loop or Exit Loop
- After the loop exits, continue with your queue filtering and topic logic
This approach will be more efficient and won't hit invocation limits.
Hope this helps!
------------------------------
Cameron
Online Community Manager/Moderator
Original Message:
Sent: 05-03-2026 22:18
From: Phaneendra Avatapalli
Subject: Workflow Loop only iterates first 2 items (0,1) - not continuing despite Next Loop
Hi all,
I'm building a Genesys Cloud Workflow triggered by the STA Topics event (v2.speechandtextanalytics.conversation.{id}.topics) and I'm running into an issue with loop behaviour.
What I'm trying to do:
Loop through Flow.jsonData.participants to extract the first available queueId, then continue with queue filtering and topic logic.
What I've done so far:
- Converted participants into a collection:
State.participants = ToJsonCollection(Flow.jsonData.participants) - Created a loop with:
- Index:
State.participantLoopIndex - Max Loop Count: 10
- Inside the loop, I tested with a minimal setup:
- Send Notification:
"DEBUG LOOP\nIndex: " + ToString(State.participantLoopIndex) - Followed by
Next Loop
Expected behaviour:
The loop should iterate through all items (e.g. index 0, 1, 2, 3...)
Actual behaviour:
The loop only runs:
Index: 0
Index: 1
Then it stops, with no errors.
Additional details:
- Participants count is correct (e.g. 4 or more)
- Workflow trigger is firing correctly
- Even when I remove all logic and keep only debug + Next Loop, the issue persists
- All paths appear to lead to Next Loop
Question:
Has anyone experienced a loop stopping after the first 2 iterations in a Workflow?
Is there any known limitation or specific configuration required for Loop / Next Loop to iterate through all items?
Thanks in advance for any help!
#API/Integrations
------------------------------
Phaneendra
Technical Solutions Consultant
------------------------------