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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Rename Multiple Invoic...
Power Automate
Unanswered

Rename Multiple Invoices in a SharePoint Library with Power Automate & AI Builder

(0) ShareShare
ReportReport
Posted on by 39

Hi All,

 

Hope you are all doing well today.

 

I am looking to create a flow that will let me rename invoices I put into FOLDER1 and output the invoices with the correct names into FOLDER2. These two folders are both located in a Sharepoint library.

 

I have already created an AI builder "InvoiceRenamer" that identifies the "Invoice Name" located on the PDFs.

I am looking to create a power automate flow that will run the AI builder every time I add new pdfs into FOLDER1 and output the correct names into FOLDER2 after the flow runs with the name as "Invoice Name".pdf.

 

Any assistance is greatly appreciated!

 

I've also already looked at this link but it did not work for me:

https://powerusers.microsoft.com/t5/AI-Builder/rename-multiple-PDF-files-by-using-data-from-within-the-pdf/m-p/2039021

Categories:
I have the same question (0)
  • plarrue Profile Picture
    Moderator on at

    Hi @123Powerapphelp 

     

    Did you have a chance to look at this CookBook ? Renaming files in SharePoint after extracting a fi... - Power Platform Community (microsoft.com)

     

    Hope it helps

    Regards,

     

    Philippe

  • 123Powerapphelp Profile Picture
    39 on at

    Hi, yes I have, I couldn't get it to run either.

    Thank you for taking the time to respond!

  • Verified answer
    ARB_wcc Profile Picture
    283 Super User 2024 Season 1 on at

    Hello,

     

    I've created a simple flow for renaming invoices in SharePoint which might align with what you're looking for. Here's an outline you can follow:

     

    1. When a File is Created: Use the trigger to start the flow when a new file is added to your specified folder.
    2. Get File Content: Retrieve the content of the newly added file.
    3. Extract Information from Invoice: Utilize an AI Builder or similar tool to extract the desired invoice name.
    4. Create File: With the extracted information, create a new file in a separate folder, naming it according to the invoice details obtained.
    5. Move File: Optionally, move the original file to an archive folder after processing.
    6. Post Message: If you need notifications, include a step to post a message in a chat or channel with the outcome.

    Remember to adjust the site addresses and folder paths according to your SharePoint structure.

    Good luck!

     

    Screenshot 2023-12-21 151843.jpgScreenshot 2023-12-21 151906.jpg

  • 123Powerapphelp Profile Picture
    39 on at

    Hi, 

     

    Thank you for your response and help! I managed to output a PDF into my desired folder now by looking at your example and altering it, however when I look at the pdfs that are renamed Sharepoint, it states that "Hmm… looks like this file doesn't have a preview we can show you." for my successfully renamed PDF. Do you happen to know why the PDFs can't be opened? Thank you!

    Help.png

     

    Edit: got it to work, thank you so much!

  • Verified answer
    ARB_wcc Profile Picture
    283 Super User 2024 Season 1 on at

    I've seen that happen before, that's usually an indication that the file is getting corrupted because of a wrong dynamic field being used in previous steps.

     

    I would double check the dynamic fields to make sure I'm using the correct ones.

     

    Get file content = @triggerOutputs()?['body/{Identifier}']

    Extract information from documents  = @{body('Get_file_content')}

    Create file = @{body('Get_file_content')}

     

    In your screenshot I see that you have select body in the Create file action, that's probably incorrect.

     

    The correct dynamic field you need to use is File Content from Get file content.

     

    See example below:

    Untitled.png

     

    Not sure why, but after you save the flow and run it successfully for the first time this dynamic field will be renamed to just body instead of File Content and it confuses a lot of people. @plarrue 

     

  • 123Powerapphelp Profile Picture
    39 on at

    Thank you for the detailed response!

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard