Help for creating Basic loops and iterations in FortiSOAR Playbooks
Hi team,
I am developing some playbooks, which then will be useful when showing the solution to potential customers.
Firstlly I´ve created a playbook that calls https://icanhazdadjoke.com/api (RestFull API) and then shows the result joke to the customer.
Now, I am trying to modify the playbook to call the above API call X times (the variable X is configured inside the playbook). For each execution the API call returns a string (the joke). So, my purpose in this second test is to present to the cusromer X jokes together, like the following:
"joke 1"+"\n"+joke 2"+"\n"+....+joke X"
The two playbooks are similar. The first one calls the API call just once.
The second playbook call the API many times (variable X) and return the outputs together (append or join could be used).
Could you help me on how to create loops (like the "for" or while commands in C), execute a code inside the loop and then show the results? Is there any example playbook you could share that does something similarly?
Thanks in advance for you attention on this matter.
Best Regards,
Rafael Righi







