Skip to main content
Solved

How to Create Nested Loops within a Playbook

  • April 7, 2026
  • 2 replies
  • 81 views

LenaLSG
Forum|alt.badge.img+1

When building playbooks for Chronicle SOAR, I often run into a limitation around looping logic. Specifically, there doesn’t appear to be a supported way to create nested loops (a loop within another loop).

This becomes an issue in fairly common use cases. For example:

  • Iterating over all entities of a specific type in a case, and then looping through the values of a particular field for each entity.
  • Looping through all alerts associated with a case, and within that loop, iterating through each alert’s entities or a specific type of entity.

These types of nested iterations are typical in automation workflows, so I’m curious about the rationale behind the current limitation. Is there a design or technical reason nested loops aren’t supported today, and is this functionality something Google plans to add in the future?

Best answer by kentphelps

Support for native nested loops is a prioritized item on our product roadmap as we finalize the architectural enhancements necessary to ensure playbook stability and optimal performance at scale.

In the interim, two-level iteration can be achieved by calling a Playbook Block containing your secondary loop from within the primary playbook loop, a modular approach that provides the necessary logic depth while maintaining execution efficiency.

2 replies

kentphelps
Community Manager
Forum|alt.badge.img+12
  • Community Manager
  • Answer
  • April 17, 2026

Support for native nested loops is a prioritized item on our product roadmap as we finalize the architectural enhancements necessary to ensure playbook stability and optimal performance at scale.

In the interim, two-level iteration can be achieved by calling a Playbook Block containing your secondary loop from within the primary playbook loop, a modular approach that provides the necessary logic depth while maintaining execution efficiency.


LenaLSG
Forum|alt.badge.img+1
  • Author
  • Bronze 3
  • April 20, 2026

Support for native nested loops is a prioritized item on our product roadmap as we finalize the architectural enhancements necessary to ensure playbook stability and optimal performance at scale.

In the interim, two-level iteration can be achieved by calling a Playbook Block containing your secondary loop from within the primary playbook loop, a modular approach that provides the necessary logic depth while maintaining execution efficiency.

Got it, the two level work around should fulfil my needs for now, but I’ll keep an eye out and look forward to the native nested loops being released.