"with the Append Log Folder, but I can't run it. Is this even a proper aproach?"
I'm using it to organize the results of the SQL query. A single folder for a single query with all information about it... so I think this is a good solution, but not quite good for solving your problem.
What programming language do you use in the script? Have you thought about using .json files before?