@clouddataquest Thanks for reaching out. Please update your workflow as mentioned below
- Make sure that you are running your loop in the sequential i.e. enabled the
Concurrency Control
and set theDegree of Parallelism
to 1 on your loop settings. - As the Create file action (for the log file) is inside the foreach loop so every time it will try to create the file and if file already exists then it will overwrite the file with the new content. So, you need to first check whether the file is already created or not. If it is created, then get the file content and add the new content else create a new file.
For your reference sharing the code view. I am only sharing the condition to verify if the file is already created or not by checking if the status of the action is 404 or not. Please modify it as per your business requirement and test it with your use case. You can refer to actions function and Configure run after behavior that I have leverage in my below workflow.
Feel free to get back to me if you need any assistance.