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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / (SharePoint) Getting f...
Power Automate
Answered

(SharePoint) Getting file content using path 404 Error

(0) ShareShare
ReportReport
Posted on by 48
I have a problem with a flow, it waits for the responses of an MS Form and the adds a new item to a SharePoint list.

Then, it reads the uploaded file and attaches it to the created item in SharePoint. (ss_001)

It works fine like the 90% of the time, and the other 10% it would fail in with an error that the file that we are trying to attach is not found (404 error) (ss_002)
- I have tried refreshing the  connections, removing, re-adding the connections with no luck.
- I tried with the relative and the absolute path and both fail with a 404 error.
- I have copied the URL from the flow with error and pasted  the URL in the browser and the attached file opens correctly.
- If I check the folder where all the files are being uploaded, the file is present in the folder.
- I have also tried the solution in this page: (ss_003)
   https://elliskarim.com/2022/01/17/how-to-send-microsoft-forms-file-uploads-to-an-approval-workflow-using-power-automate/
But it would throw a 404 on all the files uploaded for 100% of the cases.
 
I have used an MS List Form previously, and that worked 100% correct all the time, but we decided to move to an MS Form as it would let customize the Form and validate the fields.
 
What else could be done in this case?
 
Thanks for you help and attention!
 
ss_003.png
ss_001.png
ss_002.png
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    1,271 on at
    It seems that the 404 error occurs because the flow runs before the uploaded file is fully available in storage.
     
    This is a timing issue with Microsoft Forms file uploads.
     
    The solution is to introduce a delay or retry mechanism (preferably a Do Until loop) before attempting to access the file.
  • Pstork1 Profile Picture
    69,323 Most Valuable Professional on at
    Are you using a Group Form for this?  I'm assuming you are since you are looking for the File Content in SharePoint. If it was a single form it would be in OneDrive for Business.
     
    Having said that can you show me the formula you are using for your file path?  The link provided will have a SharePoint site URL that needs to be removed from the front of the link before you can use it as a path.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
     
  • Valther Profile Picture
    48 on at
    Yes, it is a Group Form. 
    Now that you mention it, that should be the reason why the OneDrive steps won't be of use here.
     
    The response from the Form is set to a Temp variable to check the content, then the attachment attribute is parsed to get the JSON from it.
     
    The Body of this JSON is passed to the "Apply to each" step.
     
    And finally, this is the Formula for the "Get file content using path":
     
    {
        "inputs": {
            "host": {
                "connectionName": "shared_sharepointonline",
                "operationId": "GetFileContentByPath",
                "apiId": "/providers/Microsoft.PowerApps/apis/shared_sharepointonline"
            },
            "parameters": {
                "dataset": "https://contoso.sharepoint.com/teams/MySite",
                "path": "@items('Apply_to_each')?['link']",
                "inferContentType": true
            },
            "authentication": "@parameters('$authentication')",
            "retryPolicy": {
                "type": "fixed",
                "count": 4,
                "interval": "PT20S"
            }
        },
        "metadata": {
            "operationMetadataId": "f6209557-5239-48b6-b61f-47afe655d5a6"
        }
    }
     
    The File Path used in this step, looks something like this:
    https://contoso.sharepoint.com/teams/MySite/Documents/...
     
    Thanks and regards!
    ss_005.png
    ss_004.png
  • Verified answer
    Pstork1 Profile Picture
    69,323 Most Valuable Professional on at
    You can't use the link property directly in the Get file content with Path because it is the full url, not the relative url to the file.  Here's a screenshot of an example I use with a group form.  In the Compose you can see I am replacing the Site URL with a null value to get the relative address of the file in the site.  Since its expecting a relative path to the file that's an essential step. In fact, I'm not sure why its working at all if you don't strip out the URL.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • Valther Profile Picture
    48 on at
    Thank you all for your help.
     
    Both recommendations have been applied and the flow is now 100% functional.
     
    Best regards!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 607

#2
Valantis Profile Picture

Valantis 456

#3
11manish Profile Picture

11manish 352

Last 30 days Overall leaderboard