Script to combine Projects and Task

Hallo

I need some more brain-power…

I have a table with Projects and a table with Task.

I will like to combine all Projects and Task in another table ProjectTask

I have try with a automation, but I can’t group all the ‘Create record’ in one action. That means that I need to create a ‘Create record’ for each task, that will fail when I add a new task to the table.

Is it possible to create one ‘Create record’ there look at all the task?

I sure is can be handle by a script – can anyone help me with a script?