Hi all, i am beginner of building flow.
I want to building flow to move the 3 photos submitted from Power Apps to the folder based on the filename.
If the folder name not match with filename first 4 digit, it will create new folder that name is the filename first 4 digit and move the file inside there.
Then it will check the filename 5th and 6th digit, if not match, it will create new folder that name is the filename 5th and 6th digit and move the file insider there.
Next it will check the filename 7th and 8th digit, if not match, it will create new folder that name is the filename 7th and 8th digit and move the file insider there.
If folder existed, it will move to the last subfolder.
My file name format: ddddmmyy_1, eg:20220808_1
Now that i can upload the photo submitted from power apps to sharepoint and know that substring can extract file name
substring(outputs('Document_Number'),0, 6)
But i do not know whether need to create multi compose and how to make the condition to check the file name and folder name
Here attached the flow chart and current flow for your easy reference.



Please forgive my poor English.
Thank you very much for your help