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
Answered

Get_file_content_using_path' failed: File not found

(1) ShareShare
ReportReport
Posted on by 25
I've been trying to follow these YT videos,https://www.youtube.com/watch?v=GVi4ubxcmTg https://www.youtube.com/watch?v=UkcZ6IxiD5w without much success.
 
My end goal is to get the base64 from the image column 'Attachment2' from a Sharepoint list that we'll send to an external system. I'm stuck on parsing the JSON output from the HTTP request, I cannot get any of the parameters I need extracted out. 
Here is the setup I have:
 

the first Parse Json's generated Schema using the output from the HTTP Get request,
 
{
    "content": {
        "d": {
            "Attachment2""{\"fileName\":\"Screenshot 2025-05-09 0659092.png\",\"originalImageName\":null,\"serverRelativeUrl\":\"/teams/mycompanyname/SiteAssets/Lists/12329fc5-db95-4f5c-9489-21ccd672cb91/Screenshot%202025-05-09%200659092.png\",\"id\":\"fec059c2-0a8a-4b97-93a8-346138461be0\",\"serverUrl\":\"https://mycompanyname.sharepoint.com\",\"thumbnailRenderer\":null}"
        }
    },
    "schema": {
        "type""object",
        "properties": {
            "fileName": {
                "type""string"
            },
            "originalImageName": {},
            "serverRelativeUrl": {
                "type""string"
            },
            "id": {
                "type""string"
            },
            "serverUrl": {
                "type""string"
            },
            "thumbnailRenderer": {}
        }
    }
}
 
 
this is the output from the above's Parse JSON that is used in Compose:
{
    "body": {
        "d": {
            "Attachment2""{\"fileName\":\"Screenshot 2025-05-09 0659092.png\",\"originalImageName\":null,\"serverRelativeUrl\":\"/teams/mycompanyname/SiteAssets/Lists/12329fc5-db95-4f5c-9489-21ccd672cb91/Screenshot%202025-05-09%200659092.png\",\"id\":\"fec059c2-0a8a-4b97-93a8-346138461be0\",\"serverUrl\":\"https://mycompanyname.sharepoint.com\",\"thumbnailRenderer\":null}"
        }
    }
}
 
 
 
 
 
the final Parse JSON 1 which uses the output from Compose
 
and finally the Get file content, which is coming out like this when I test it:
'//Attachmemnt1'  so for some reason the parameters of the path are all blank in this step, even though they have values in previous steps
 
 
I've wasted 3 days on this already, does anyone have any insight?
Categories:
I have the same question (0)
  • Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at
     
     
     
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
     
  • baaaailey Profile Picture
    25 on at
    thanks for the response. I have already read this article though! 
    Specifically I'm looking for help in understanding exactly where in my flow I'm going wrong to get a blank serverRelativeURL
  • Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at
    Just to confirm, you are trying to get the content of a SharePoint image column.
     
    Please share the screenshot of how the following actions are configured
    1. When an Item is created or Modified
    2. Get Item
    3. "Send an HTTP Request to SharePoint" has been configured.
     
    Could you also please share the output body of the "Send an HTTP Request to SharePoint".  
     
     
     
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
    If this solved your issue, please mark it as ✅ Accepted Answer. If it helped, feel free to give it a 🩷 Like!
  • Verified answer
    Inogic Profile Picture
    1,135 Super User 2025 Season 2 on at
    Hi,
     
    This is happening because the value you're accessing directly from the JSON is actually a JSON string, not a proper JSON object.
    Your data is available in the Attachment2 field. The data looks like the following:
    "{\"fileName\":\"Screenshot 2025-05-09 0659092.png\",\"originalImageName\":null,\"serverRelativeUrl\":\"/teams/...\",\"id\":\"...\",\"serverUrl\":\"https://...\",\"thumbnailRenderer\":null}"
    This is a string, not an object.
    In order to get the data properly, you need to add the following steps:
    1. Add a Compose action and use the following Power FX expression:
    json(body('Parse_JSON')?['body']?['d']?['Attachment2'])
    1. After this, add a Parse JSON action to parse the output.
    • Pass the output from the previous Compose as the content.
    • Use the following schema:
    {
        "type""object",
        "properties": {
            "fileName": {
                "type""string"
            },
            "originalImageName": {
                "type": [
                    "string",
                    "null"
                ]
            },
            "serverRelativeUrl": {
                "type""string"
            },
            "id": {
                "type""string"
            },
            "serverUrl": {
                "type""string"
            },
            "thumbnailRenderer": {
                "type": [
                    "string",
                    "null"
                ]
            }
        }
    }
    After parsing this, you will get all the values you need directly from the Parse JSON action.
     
    Hope this helps.
     
    Thanks!
    Inogic
  • baaaailey Profile Picture
    25 on at
    thanks! trying this out now
  • baaaailey Profile Picture
    25 on at
    Im still getting a file not found. However, instead of the path being null, it's now there but the file cant be found.
    I've tried the following fx formula to decode the uri string as well (didn't work either):
     
    If I paste the uri into my browser, the image comes up though!
  • baaaailey Profile Picture
    25 on at
    Actually, I re-read your article and spelled the file path out like it's mentioned there and it worked.
     
    thanks for the help!
  • Ellis Karim Profile Picture
    11,683 Super User 2025 Season 2 on at
     
    Glad to hear it!
     
    If this solved your issue, please mark it as ✅ Accepted Answer to help others.
     
     
    Ellis Karim
    Ellis Karim
    Blog | LinkedIn | Bluesky
     
     
     

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

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard