I'm brand new to Power Automate and have been reading and watching videos (and searching the forum) on what I'm trying to accomplish. Sorry to ask a question that is probably very obvious.
Basically, when a specific file is created in a OneDrive folder I want some other folders created and added to the folder where the original created file is located. Once I get this logic down, I have other items to add as well but I'm just struggling to create the folder (file) in the same location as the triggered file. I realize that OneDrive doesn't allow you to create folders and I can get around that by creating a file within a folder for it to make the folder and then can delete the file.
I've learned that OneDrive encodes the file names so I was able to get the trigger to work by editing this condition:
My issue is that I'm not able to find that original folder with my create command. When I use the File Path expression for my folder path and then put a subfolder under that (below)
triggerOutputs()?['headers/x-ms-file-path-encoded'] and then I added my folder that I wanted it to create.
When this fails, input data is this below; which is including the name of the file in the path and therefore seems to not be letting me create a file using that. Is there a way to change the folder path to only read the folder names less the file name?
"folderPath": "/drives/ENCODED FOLDER NAME/root:/Main Folder/Jobs/Job Name/Project Log - Job Name.xlsx\\Contract And COs",
Sorry if I've asked this in the most complicated way possible. If there is a simpler way to do this please let me know. We are basically kicking off a project by putting a specific file into the root of a OneDrive folder. Once that's found, I wanted Power Automate to create subfolders automatically.