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 (Shar...
Power Automate
Answered

Get File Content (Sharepoint)

(0) ShareShare
ReportReport
Posted on by 10

I'm new to Power Automate (slowly getting the hang of it) and I am having an issue with the "Get File Content" action. My starting trigger is "When a file is created in a folder(Sharepoint)" with the action "Get File Content" followed by "Get file Metadata". 

 

The issue I'm having is when I try to insert the "file id" dynamic content in both "Get File Content" and "Get file Metadata", there is no option only "x-ms-file-id" which I've tried testing but does not work. 

 

What is the difference between "File id" and "x-ms-file-id" and why can I not get the former even after the trigger?

Categories:
I have the same question (0)
  • Verified answer
    Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    I just ran a test and "x-ms-file-id" should work.  That is the file identifier for this particular trigger.  As you can see from the screenshots below it does work

    image.png

    image.png

  • milk4chocolate Profile Picture
    4 on at

    Hi Pstork1,

    Your screenshots are great.  I have a new question regarding Get File Content. I am trying to send this file as attachment in the email as below.  I can see the attachment in the email but the PDF file is always blank.  Please help.

     
     

    TT.jpg

     

    Best regards,

    Christina

  • Pstork1 Profile Picture
    68,707 Most Valuable Professional on at

    The ContentBytes property should be 'File Content' from the Get File Content, not 'Body'.

  • PANube Profile Picture
    8 on at

    Hi Pstork1,
    I would agree, but MS seams to update the File Content after saving and reopening the FLOW. So you end up withe the body, although you chose the File Content.

    Before saving the Flow:

    PANube_1-1649311316751.png

    After saving an reopening the FLOW:

    PANube_2-1649311357893.png

     

     

  • PANube Profile Picture
    8 on at

    And it seems, that Body behaves different than File Content. At least I get problems when I try to pass on the File Content.

  • Community Power Platform Member Profile Picture
    on at

    If this is inside of an apply to each function then your dynamic content may be misrepresenting the location. You can try using expressions instead to ensure you're grabbing the file content from the current pass on the apply to each rather than the get file content connector. It should look something like this: items('Apply_to_each')?['File_content']

     

    Let me know if this helped, and consider giving it a thumbs up to help other users find this answer in the future.

  • Community Power Platform Member Profile Picture
    on at

    How can you direct a file based on a particular string in its name?

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