Skip to main content
Fabien1
Explorer II
February 1, 2024
Solved

For loop and pagination

  • February 1, 2024
  • 2 replies
  • 4964 views

Hello,

 

In some data ingestion steps that are relying on pagination ( OpenCTI "Get Indicators" action for instance ), while using for loop in playbook step, we need to provide the output  variable of one loop as an input for the next loop to be executed. How can we achieve this?

 

Regards

Fabien

Best answer by okumbhar

You can create one parent playbook and one child playbook which is self referenced

2 replies

okumbhar
Staff
Staff
February 2, 2024

You can set variables in a playbook step, use those variables in next steps and then after that you can use decision step to go back to any previous step based on the condition that you define.

Harsukhrpeet
Visitor III
February 2, 2024

Thank you for your reply.
We tried this but it does not allow us to go back to any previous step again, i.e : one step can be executed only once.

Here is the error message for reference: 
"CS-WF-13: Invalid Playbook. Playbook should always be Directed Acyclic Graph"

okumbhar
Staff
okumbharAnswer
Staff
February 2, 2024

You can create one parent playbook and one child playbook which is self referenced

Contributor III
February 15, 2024

Thank you for your valuable suggestion! We've taken note of your request and will explore its feasibility for future consideration. Given our current focus on multiple customer priorities, it's challenging to commit to a specific timeframe, but please know we'll diligently pursue this matter.