Just to close the loop on this after a bit more testing, it looks like this is expected behaviour
The topic filter at the trigger level controls when the workflow fires (i.e. when those topics are detected anywhere in the conversation), but the payload itself still includes the full list of detected topics.
That also explains why the workflow doesn't run for every interaction it only fires when there's a match on the configured topics.
I ended up handling the filtering again inside the workflow loop to pick out the relevant topics.
Original Message:
Sent: 05-08-2026 19:09
From: Phaneendra Avatapalli
Subject: Workflow Loop only iterates first 2 items (0,1) - not continuing despite Next Loop
Thank you everyone, I got it working now.
The issue ended up being with how I was handling the loop logic and conditions inside the workflow.
One thing I wanted to confirm while testing Speech & Text Analytics topics, I noticed that even when I filtered topics at the trigger level using:
topics[?(@.topicName == 'Dissatisfaction' || @.topicName == 'Complaint' || @.topicName == 'Agent Knowledge Gap')]
the workflow payload still seems to include all detected topics, not just the filtered ones.
From what I observed, the filter controls whether the workflow fires, but the payload still contains the full topics collection, so I handled filtering again inside the workflow.
Just checking - is this the expected/default behaviour?
Thanks again for the help!
------------------------------
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
------------------------------