Skip to main content
Question

How to repeatedly loop a playbook prompt until the answer is "Yes"?

  • June 16, 2026
  • 8 replies
  • 121 views

Forum|alt.badge.img+1

I am trying to build a SOAR playbook where in I will have a condition block, which if answered “Yes” will continue to the next block, and if ansered “No” that it will repeatedly ask the same question again and again, how do I achieve this ?
 

 

8 replies

dnehoda
Staff
Forum|alt.badge.img+19
  • Staff
  • June 16, 2026

1.Add the Manual Input / Analyst Prompt:Step 1.

Create a Manual Input action (or a user prompt block) that asks the analyst your question. Ensure your answer options are clearly defined as a drop-down or selection (e.g., ["Yes", "No"]).

2.Add a Conditional Block:Step 2.

Directly follow the prompt with a Conditional block. Configure the condition to evaluate the output of your Step 1 prompt:

  • Condition: If Answer Equals Yes

  • True Path: Route this to the rest of your playbook (Success / Break loop).

  • False Path: Route this to Step 3.

3.Add a Return Junction (Helper Action):Step 3.

On the False path (where the user answered "No"), add a lightweight, passive action. A standard Tools > Ping or Script > Construct String block works perfectly. This action does nothing but execute a baseline step.

4.Close the Loop:Step 4.

Draw the output line from your Step 3 Helper action back to the input side of Step 1 (the original prompt).


Forum|alt.badge.img+1
  • Author
  • Bronze 1
  • June 16, 2026

@dnehoda thanks for the suggestion! I tried setting this up exactly as you described. Steps 1 through 3 work fine, but I cannot execute Step 4. The playbook UI doesn't allow me to draw a connection line backwards from Step 3 to Step 1, they just won't snap together. Am I missing something here to make the UI to accept a backward connection?


smit8
Forum|alt.badge.img+6
  • Bronze 4
  • June 17, 2026

Looks like AI reply. I tried the same, but not working. Please share if you succeed, I don’t think this is possible


cmorris
Staff
Forum|alt.badge.img+16
  • Staff
  • June 17, 2026

Current loops in SOAR function like a for each loop, whereas you are looking for a while loop. We may have some additional options that could work here, can you share what the action in the loop that you are waiting on is doing?

If you are polling some system and the action is asynchronous, we can configure it to check in periodically with a timeout if a response is not received. Example - the action will run for up to 1 day and completion will be checked every hour:

A manual action assigned to an analyst to confirm completion could be another option.

If you are waiting for a change to the alert or case (ex. stage, tags, priority, custom field changes), you may be able to use reaction triggers in the future after they are released - https://docs.cloud.google.com/chronicle/docs/soar/respond/working-with-playbooks/using-reaction-triggers-in-playbooks.


AnimSparrow
Forum|alt.badge.img+6
  • Bronze 5
  • June 17, 2026

did you try to use “loop” function? If you provide more input what in particular you would like to have there I can assist you :) Exiting loop only when some context value or output is meet

 


AymanC
Forum|alt.badge.img+14
  • Bronze 5
  • June 17, 2026

Hi ​@shubmandal,

Nothing out of the box I don’t think, however I think (hypothetically) you could achieve this by:

  1. Create a block
  2. Looping through the items / entities
  3. Present the Multi-Choice Question, with the ‘Yes’ or ‘No.
  4. Any that are selected as ‘No’, are stored (i.e: Append to Context Value, using ‘Loop.Item’)
  5. Loop Finishes
  6. Utilize the ‘Get Context Value’ action, querying the Context Value storing those selected as ‘No’ in Section 4. This will output the values
  7. If there’s no values, this means all were selected as ‘Yes’ in the Multi-Choice Question, block ends.
  8. If there are values from the ‘Grab Context Value’ action, utilize the following endpoint ‘/api/external/v1/playbooks/AttacheWorkflowToCase’ which attaches another block which just checks (within the loop), values within the Context Value.
  9. This block will iterate through all the values in the Context Value, re-ask the Multi-Choice question, check if there’s any values in the ‘Grab Context Value’, if there are, utilize the below endpoint ‘/api/external/v1/playbooks/RerunBlock’  to continuously re-run this new block until there are all ‘Yes’ selected
  10. When there are no values left in the Context Value, finished.

Kind Regards,

Ayman


Forum|alt.badge.img+1
  • Author
  • Bronze 1
  • June 22, 2026

Hey guys, thankyou everyone for your efforts, In my case I want to have a multiple choice question, which acts as a Analyst's Acknowledgement of the case (as the assignment is automated via MS Team's availability), if the analyst says "Yes", they can proceed, if they say "No" it will return to a shared queue, from where the assignment automation will reassign the case to the next available analyst.

@cmorris ​@AnimSparrow ​@AymanC 


AnimSparrow
Forum|alt.badge.img+6
  • Bronze 5
  • June 22, 2026

so It looks like jobs topic

OR - maybe dumb but the easiest would be
to make playbook and attach this decision as very 1st one and if answer is NO to attach the same playbook - it will cause this playbook to restart and do the stuff again
maybe not SMART way but for sure working one ;) (there is hardcoded limit for 10playbooks run BUT only via human hands, via automation you can have WAY MORE)