Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

Renaming a file in sharepoint based on extracted data

(0) ShareShare
ReportReport
Posted on by 52

I built this flow that extracts data from my PDF and uses that to add metadata to the file. I want it to also rename the file to something it extracted from the PDF but I got stuck there. I tried to work around that by creating a new file instead and this works perfectly but now I am left with the original PDF plus the renamed PDF. I tried adding a "Delete file" action but then it just deletes both. Can someone please guide me here? TIA

 

 

michalt1_0-1679577475771.png

 

  • michalt1 Profile Picture
    52 on at
    Re: Renaming a file in sharepoint based on extracted data

    Thanks, I am not seeing where you are extracting data though which is why I used Encodian . I have notations in the header and footer of my PDFs, one to be extracted and that will become the file name and another to be extracted and added as metadata. I solved this using my flow but cannot understand why I cannot delete the first file and leave the newly created one.

  • ScottShearer Profile Picture
    25,236 Most Valuable Professional on at
    Re: Renaming a file in sharepoint based on extracted data

    @michalt1 

    Please take a look at my example below - please add the parse JSON and the Extract Text actions as appropriate.

    First, you are using a deprecated trigger which is not recommended.  I use the updated trigger.

    Please let me know if you have more questions.  Note that this is an example - your Flow should be similar but not exactly the same.

    image.pngimage.pngimage.png

     

     

  • michalt1 Profile Picture
    52 on at
    Re: Renaming a file in sharepoint based on extracted data

    Thanks this is what I tried as well as the error that resulted

     

    michalt1_0-1679689864151.png

     

     

     

    michalt1_1-1679690235603.png

     

  • ScottShearer Profile Picture
    25,236 Most Valuable Professional on at
    Re: Renaming a file in sharepoint based on extracted data

    @michalt1 

    Can you add the Delete file action back and post a screen shot?

    If you have two files, both should not be deleted...

     

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1