Hi, fairly new to Power Automate.
This flow (screen shot attached) triggers when a file is created in a specific SharePoint library. I want it to check if the file is a PowerPoint (.pptx) or Word (.docx) document. If it is, the flow retrieves the file content, creates a temporary copy in OneDrive, converts it to PDF. It then retrieves all files from the SharePoint library. For each file, it checks if the file is a PDF and matches the converted file name. If true, it updates the file; if false, it creates a new file in the SharePoint library. Finally, it deletes the temporary file from OneDrive.
Condition 2 seems to work, where there is no file with the same name. The converted file is placed in the SharePoint library. (Although I don't know if it is working for the right reasons.)
However when the pdf is already in the library, it sends the flow down the false route again.
Basically I want to update the pdf if a file already exists with that name in a sharepoint library, and create it if not.