Flow to copy and tag based on the source path

Hi,
I’m new on Nextcloud and would like to automate the copy of a new file to another folder, and tag the copied file
The tag value has to be related to the source folder name.
I was thinking about using flow with a file action in LUA.
I can trigger the flow when a new file is created, but I have no clue on passing the new filepath to the LUA script.
I’m not even sure this is possible.
And about tagging, I don’t see any granularity so I could set the tag according to the source folder.
What do you think would be the best way to achieve this ?
Thank you