web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Converting then Updati...
Power Automate
Unanswered

Converting then Updating PDF

(1) ShareShare
ReportReport
Posted on by 17
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.
 
Categories:
I have the same question (0)
  • Fredrik_A Profile Picture
    3,570 Super User 2026 Season 1 on at
     
    Hello!
     
    Could you please share an image of your current flow and the condition that isnt working correctly? 
  • draxicle1 Profile Picture
    17 on at
    Hi there.
     
    Here you go.
     
    Regards
    PDF flow.png
  • draxicle1 Profile Picture
    17 on at
    Hi again.
     
    I have had to change tack with my approach, as the "For All" step was using too much resource, and was cycling through multiple times. (I even got a message from Microsoft telling me so)
     
    I have changed the flow using an array filter instead (see New Flow using array).
    The intention is that the array filter brings back all the files where they match the one I converted in my OneDrive.
    The condition ( see Condition) is supposed to do the following
    If there zero in the array , create the file
    If there are more than zero, update the file that matches
     
    The flow successfully creates a PDF when there are no other pdf files with the same name. (by luck rather than design maybe)
     
    When there is a PDF in the library already, the flow fails to take the TRUE path (see Flow Error)
     
    Thanks!
     
     
     
    New Flow using array.png
    Flow error when PDF already exists.png
    Condition (array length).png
  • Fredrik_A Profile Picture
    3,570 Super User 2026 Season 1 on at
    Is Pagination turned on in the "Get file" step?
     
    If not, press the three dots, and enable pagination and set it to 5000

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard