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 usin...
Power Automate
Unanswered

'Get file content using path' succeeds/fails based on file type

(0) ShareShare
ReportReport
Posted on by

Hi all,

 

tl;dr: The "Get file content using path" action sucees for png and pdf file, but fails for xlsx, docx, pptx files.

 

The general aim of the flow is to attach a file that was shared via MS Forms to an MS List entry.

As both, the MS Forms and the MS List, are "owned" by a SharePoint instead of an individual solution explained in this video (from 29:38 onwards) was applied: Video 

 

The overall flow structure is:

flow structure.png

 

The error received is:

flow failed for pptx file.png

 

The full file content box says:

"status"404,
  "message""File not found\r\nclientRequestId: ba4a063d-7081-44e9-859f-3f9c6864f708\r\nserviceRequestId: ba4a063d-7081-44e9-859f-3f9c6864f708"
 
For a successful run, it would say:
 
  "$content-type""application/octet-stream",
  "$content""/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAM...
 

 

The part where the error occurs is:

flow error part.png

 

The json is the standard json(outputs('Get_response_details')?['body/question_id']).

The expression used for "File Path" is item()?['link'].

The "Infer Content Type" was checked with Yes and No - error occured in both cases.

 

When I run the flow with a file with format e.g. png or pdf, everything works as expected and the "Get file content using path" runs successfully. When I run it with a file (same name just different format) of type docx, xlsx, pptx the flow fails with the error "NotFound". The File Path that is shown in the action, however, seems correct. If I manually copy it into my browser, the file opens (thus the assumption that the file path is correct).

 

Does any experience a similar issue or has an idea how to either change the flow or has an idea of what should be done to further identify the root cause?

 

Thanks

 

Categories:
I have the same question (0)
  • Verified answer
    emguyant Profile Picture
    13 on at

    I had the same issue for a group Form; it might be due to the differences in the links provided in the Form Response.

    For docx/xlsx/pptx the link opens the document in the associated web application this link differs from the path to the document within SharePoint and from the links seen for PNG/PDF files which opens a preview of the file.

     

    I was able to add attachments for all the file types using the following for File Path:

    /Shared Documents/Apps/Microsoft Forms/<form_name>/<question_folder_name>/items('Apply_to_each')?['name']

    This is a similar format you will see for your PNG/PDF file uploaded to the Form.

  • Lukas_Schli Profile Picture
    on at

    Thanks for the reply - this makes sense.

    It was necessary to combine the hard path with the Expression for "item('Apply_to_each')?['name']

     

    solution.png

     

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