Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

❓ Power Automate Flow Issue – “Get file metadata using path” Fails

(1) ShareShare
ReportReport
Posted on by 12
Hi everyone,
I’m trying to build a Power Automate flow for processing invoices from a SharePoint library, but I’ve been stuck with a problem for the last 2 days and can’t figure it out.
📝 Context
This is part of a larger multi-layer project:
  • ✅ I’ve already set up the SharePoint environment.
  • ✅ Created the database and trained an AI model (16 variables with 96% accuracy).
  • 🔜 After completing this flow, I plan to build a PowerApps Canvas app and integrate everything with Azure.
  • 🛠 What my flow does
Here’s what happens in the flow:
  • 🚀 Trigger: Starts when a file is uploaded to the Pending Processing folder in SharePoint.
  • 📝 Initialize Variables: Prepares variables for later use (e.g., file name, status).
  • 📄 File Validation Check: Confirms if the uploaded file type is allowed (PDF, JPG, PNG).
  • 🤖 AI Builder: Extracts invoice data and checks the confidence score:
  • 📁 Move File: Depending on validation, the file is moved to the correct folder (Processed, Manual Review, or Error).
  • 📧 Send Emails: Notifies relevant teams about file processing outcomes.
  • 🚨 The Problem
    • ❌ If invalid → Move the file to the Error folder, log it in Excel, and send an error email.
    • ✅ If valid → Pass the file to AI Builder for invoice data extraction.
    • 🎯 High confidence (≥80%) → File marked as AI Processed.
    • ⚠️ Low confidence (<80%) → File sent for Manual Review.
The flow gets stuck at the step where it tries to “Get file metadata using path” or “Get file content using path”.
It keeps giving this error:
 
❌ “File not found”, Bad Request, Failed to verify, Unable to find the file,
But the file is definitely there in the folder, and the path I’ve provided seems correct.
 

✅ What I’ve tried so far

  • Double-checked the folder path.
  • Tried converting the site URL to plain text (didn’t work).
  • Used:
  • My library name is “Incoming Invoices”, but in Power Automate it appears as “Shared Documents” (I tried both).
  • Replaced spaces in library/folder names.
  • Verified my account has full permissions.
  • Switched from “get file using path” to “get file using identifier” but couldn’t find a proper identifier from the trigger.
  • Tested multiple times but keep getting the same error.
  • ❓ My Questions
  • Why is get file metadata/content using path not able to find the file even though it exists?
  • Could the library name (Incoming Invoices) be causing this issue?
  • How can I reliably fetch file details after the trigger without path errors?
  • Has anyone faced this issue before? What worked for you?
    • Get file properties only
    • Get file by path (with and without metadata)
    • Body, ID, Name, Full path from dynamic content – none worked.
🙏 Any help or suggestions would mean a lot. I really want to move past this and complete the project.
  • Suggested answer
    Meelad Sultan Profile Picture
    12 on at
    ❓ Power Automate Flow Issue – “Get file metadata using path” Fails

    Hi Michael E. Gernaey,

     

    I wanted to let you know that the issue has been resolved with your guidance—thank you so much for taking the time to help me out! I truly appreciate your effort and support.

    To give you a quick update: I’m currently working on an invoice processing automation system, where I’ve trained an AI model with 16 variables to extract key data points from uploaded invoices. The flow dynamically checks different file types and validates these 16 variables accordingly.

    At this stage, I’ve successfully implemented the false condition for unsupported file types, which moves such files to a “Rejected” folder, sends an email notification, and logs the details in Excel. Now I will also add the  true conditions for supported file type, where the files are processed through the trained model and the workflow continues for valid invoices.

    After completing the flow, I went ahead and built a Canvas App, which I’ve integrated with Azure services to further streamline the process and provide a user-friendly interface for interacting with the system.

    For your reference, I’ve uploaded a screenshot of the updated flow showing these changes.

    Thank you once again for your valuable guidance—it made all the difference!

    Best regards,

    Muhammad Meelad Sultan

  • Verified answer
    Michael E. Gernaey Profile Picture
    44,275 Super User 2025 Season 1 on at
    ❓ Power Automate Flow Issue – “Get file metadata using path” Fails
     
    Unfortunately, you are missing how the trigger I have below works, that and the Trigger you are using is Deprecated, meaning its going to be deleted and gone forever in the near future.
     
    This trigger (which is the better trigger and has replaced it) has a folder property so there is no reason to use the one you are using. Now let's set that aside.
     
    So what you are doing does not make sense, but it makes sense why  you are getting the error as you are in fact breaking the context as I suspected.
     
    You should not be looping through anything. I do not know what it is you are looping through, because you haven't explained what is the Apply to each so please Open that up so I can see it and explain (P.S. I had asked for the actual details within the actions. That means you have to click them and it will open them and give you the details for the raw inputs and outputs like this
     
    Here I clicked on Get File Metadata in my run so I can see the actual results, that's what I need to see in your Apply to each because my belief is you are looping through
     
     
    1. Change your Trigger, use the one I have above, its the correct one to use in this instance since you want the Properties of any brand-new file and you can set the folder. Having a trigger and then having to call extra Actions costs $$ , time and resources
     
    2. What exactly are you looping through? Without seeing your reason for a loop, understand this, even if the Get File metadata worked, you would be calling it 10 times for the same file for now reason (I can tell because your picture says its going to loop 10 times.
     
     
    So please remove the apply to each, its happening because you have entered the wrong property into the get file metadata and IT added the loop automatically which would in fact be wrong, as you do not need a loop, as you are only supposedly looking at a single file.
     
    ---Change your Trigger by deleting it and then clicking to put the one I have above.
    ---Delete the Loop and metadata call
    ---Delete the Get File properties only
    ---Add your Get file meta-data back in, using the proper Identifier attribute from the new trigger
    ---Keep your get Content, but fix it, since you have changed the trigger by updating it to point at the new trigger outputs. You may not see a specific error yet, but it will wipe any identifiers etc you added to that action so you just need to add the proper property back
     
    And please explain what the Loop is for, as you dont need it, trust me, if you do it my way, it probably will never get created.
     
    If you want, feel free to TURN OFF your flow
    Do a Save As
    Change the copy as I said above
    It will work
     
    Then you can either delete your original and rename the new one or just change your old one
     
    Either way those are the answers.
     
    If this resolves your issue please Mark this as the Answer and maybe a like.
     
    Thanks
    -Michael
     
  • Suggested answer
    Meelad Sultan Profile Picture
    12 on at
    ❓ Power Automate Flow Issue – “Get file metadata using path” Fails

    Michael E. Gernaey, thank you so much for taking the time to answer my question earlier. I really appreciate your effort and guidance. However, my case seems to be a little different, and I’m still facing issues.

    Here’s what’s happening in my flow:

    • I’m using the “When a file is created in a folder” trigger because I need to start the flow as soon as a file is uploaded to a specific folder in SharePoint. Changing the trigger is not really an option for me because the upload process depends on this folder.

     

    • I’ve tried repeatedly checking and validating the file path—it looks correct every time.
    • I even added steps like Get file properties only and Get file using path, and they both work perfectly 
    • The challenge I’m facing is with the “Get file metadata” step.
    • However, whenever the flow reaches Get file metadata, it fails with the same “File not found” error again and again

    To troubleshoot:

    • I’ve used a Compose action and also tried getting the Identifier via Get file properties only because the trigger does not directly give me the identifier.
    • I’ve also tried passing the GUCID code from Compose and other blocks into the metadata step, but it didn’t resolve the issue either.

    So far, nothing I’ve tried has worked, and I keep getting stuck at the same point.

    I have upload screenshots of my flow and error details so you can get a clearer picture of what’s going wrong. Hopefully, this will make it easier to spot if I’m missing something obvious.

    Thanks again for your time and support—I truly appreciate it!


     
     
  • Michael E. Gernaey Profile Picture
    44,275 Super User 2025 Season 1 on at
    ❓ Power Automate Flow Issue – “Get file metadata using path” Fails
     
    Welcome :-). Firstly I am moving this to the Power Automate Flows where it should have gone so it's in the correct place.
     
    I would really need to see the actual flow. Having the pseudo steps is nice, but it's not enough to help you. There are multiple Triggers that can do what you are saying in SharePoint, so seeing the exact one is important.
     
    If it says it doesn't see it, then you are pointing to the wrong place, honest, it's just that simple.
     
    Showing Simple Sample, This is what I need you to do (its listed below).
    Here you can see I have a simple flow when a File is created properties only.
    I literally put all 3 flavors or Get file metadata and content and you can see they all work.
     
    So for Get File Content and Get File Metadata, you need to use the one named Identifier.
    When I first try to add it to the Get File Metadata, all I see is the trigger properties, and I have to click Show 60 more. Then scroll down and you will see it, its not in alph order oddly or at least not fully so just go slow until you see it, then when you add it looks like the below
     
    Then for Get File Content with Path
    I simply use the Dynamic Full Path property of the Trigger
     
    As you can see all of mine worked without issue.
     
     
    So now I want you to build a flow just like mine above. except we are purposely NOT going to create a new one ... exactly, as I want to use your current trigger as is.
    1. Turn off your current flow we don't want it on
    2. Do a Save As on your current flow, as I do not want your trigger to change in any way
    3. Delete everything below the trigger. 
    4. Add the next 3 actions, just like mine.
    Populate the fields just like I have and run it in Test mode within the Editor. Once its running in test most, drop a file and I will bet that it works just fine.
     
    Which if the above does, that says you are making a mistake with what you are doing in your other flow, which is why the Next Steps are important
     
    Next Steps
    1. Go into a Flow that Failed, do this via the Details page of the flow and pick a run
    2. Provide Screen shots of the Flow up until it fails (after that doesn't matter)
    3. Have the actions opened, showing the Inputs and outputs
    4. We want to verify visually that the Incoming data from the Trigger, is what you are passing around, as right now I am not even sure where in the flow exactly this step is failing, so its possible you have unintentionally broken the context of the trigger data or are just... accidentally pointing to the wrong Library
     
    This is how we will find it
     
    Bring that back, or if you do the test and mine works, then you go Oh.. now I see. and it resolves your Issue, please Mark the answer as such and maybe a like.
     
    Thanks!
     
     

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