For future references this was actually achievable :
you need to create some counters (as an incident fields ) and return the part you want to loop through to the condition point , then break out of it to an end point if the counter has reached zero , below is the playbook , reply to this if you needed any help.
------------------------------
mohamad islam hamadieh
------------------------------
Original Message:
Sent: Thu July 18, 2024 07:19 AM
From: mohamad islam hamadieh
Subject: repeat a function X time in a playbook
Dear Community,
I was wondering if there is a way to repeat a function (or any part of a playbook) for X amount of time.
X can be based on anything like a filed or a variable I set in a script.
If you are wondering what I will use this for, my goal is to create X amount of Incidents using the create an incident function from Incident utilities. unfortunately I can't know X value before running the playbook.
Thanks.
------------------------------
mohamad islam hamadieh
------------------------------