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 / Get file content using...
Power Automate
Unanswered

Get file content using path works in PowerAutomate but fails when run from PowerApps

(0) ShareShare
ReportReport
Posted on by 68

I have built a flow that creates a PDF file from some SharePoint online content. The PDF includes an image file that I am storing in OneDrive. 

When I run the flow through Power Automate everything works just fine. When I run the flow through a PowerApp - the flow run fails every time at the "Get file content using path" step where I am specifically getting the image file, with a 404 not found error.  Any ideas?

 

2020-06-18 08_54_10-Run History _ Power Automate.png

Categories:
I have the same question (0)
  • JohnAageAnderse Profile Picture
    1,986 on at

    Hello @8BitWarrior 

    Are there any differences in which account is running the flow? Any differences in permissions to the file then?

    Kind regards, John

  • 8BitWarrior Profile Picture
    68 on at

    Hi @JohnAageAnderse 

     

    The account that runs the flow in PowerAutomate is different to the one that I am using in the PowerApps. However, I had thought about permissions. And I even granted permissions to that use on the folder and file level. But that did not resolve the issue at hand.

  • Verified answer
    8BitWarrior Profile Picture
    68 on at

    I managed to solve the issue by switching to the 'Get file content' action rather than use the 'Get file content using path' action.

  • DML1 Profile Picture
    136 on at

    To use get file content you need the Id right and that Id you have to get it from list of files present in folder. Will not add apply to each action?

     

    I have same problem but i don't want that apply to each action to be added there, any workaround pls?

    Regards,

    DML

  • JohnAageAnderse Profile Picture
    1,986 on at

    Hello @DML1 

    Use tha action "List files in folder", this will give you all the files (till the limit).

    Add a "Filter array" action and filter for the one file that you want. That will give you a one item array of files.

    Use an expression to get the Identifier of that single item in the array of files!

    Kind regards, John

  • DML1 Profile Picture
    136 on at

    Hi John,

     

    Thanks for your response, it looks like promising. As i am newbee to power automate could you please share some screenshot on this, because whatever i try flow automatically adding apply to each and i dont want that to happen because the email be triggered twice if apply to each added.

     

    Thanks in advance.

  • JohnAageAnderse Profile Picture
    1,986 on at

    Hello @DML1 

     

    List files in a folder action - do you have that one?

    Filter array action - do you have that one?

    Use either a Variable action or a Compose action - add in there an expression to get the First item from the Filter array action.

     

    Show us what you have so that we better may be able to help you on the way. Kind regards,

    John

  • DML1 Profile Picture
    136 on at

    Thanks for the response and guidance John. 

     

    Flow was giving error when followed but done few changes on you suggestion post filter array action.

     

    1. List of files in folder

    2. filter array - From(Value), condition on file name

    3. Select - Body(Filter Array), expression - item()?['Id']

    4. Compose - body(Select_Id')?[0]

     

    The flow is flawless now. Thank you so once again

     

    Regards,

    DML

  • CU12091723-0 Profile Picture
    8 on at
    Hello, 
     
    Realise you were having this issue 2 years ago, I am also new to power automate and facing the same problem. I have tried the get files from list and get file content but i'm going wrong somewhere.
     
    How did you resolve the problem? This is my error message.
     

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 522 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 364 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard