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 / File Content not avail...
Power Automate
Answered

File Content not available when using base64ToBinary

(0) ShareShare
ReportReport
Posted on by

Hi,

I get a weird behaviour when trying to move files from Dataverse to SharePoint.

First, I get Notes with .jpg attachments in Dataverse

Jorge_0-1663687230522.png

 

Then I do create a folder and a file.

When creating the File, in the file content, if I choose  items('Apply_to_each')?['documentbody']

it works, however file cannot be opened in SharePoint as incorrect format, found that I need to create the file using base64ToBinary

 

But the weird thing is that when I use: base64ToBinary(items('Apply_to_each')?['documentbody'])

it gives me an error with: The template language function 'base64ToBinary' expects its parameter to be a string. The provided value is of type 'Null'

 

Jorge_1-1663687671052.png

 

Jorge_2-1663687724275.png

 

 

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Jorge ,

     

    You can use the Download a file or an image action to get the file content instead:

    vjefferni_0-1663749597120.png

     

    Best regards,

  • Jorge_ Profile Picture
    on at

    Hi @v-jefferni 

     

    I cannot use that action for attachments on Notes.

     

    Jorge_0-1664198467234.png

     

     

  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Jorge ,

     

    Could you please check the notes table and see in which column the files are stored? It is a common process to get file contents from the Notes table:

    Upload or download image and file content - Power Automate | Microsoft Learn

     

    You will not be able to get file contents by querying the documentBody column in Notes table:

    PQ Returns "Null" Rows from Dataverse Table '[Note... - Microsoft Power BI Community

     

    Best regards,

  • Jorge_ Profile Picture
    on at

    Hi @v-jefferni 

     

    The file is on the documentbody, and throws Resource not found for the segment 'Note'.

    As you might know, Notes its an out of the box entity which cannot be modified.

     

    So, it is not possible to get Notes file contents within a loop in Power Automate?

     

    Jorge_0-1664463203725.png

     

  • Verified answer
    v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @Jorge ,

     

    Based on my test, get document body from note table is achievable in a loop.

    vjefferni_0-1664505854256.png

    Result:

    vjefferni_1-1664505969162.png

     

    It seems there is something wrong with your fetch XML query expression:

    Use lists of rows in flows - Power Automate | Microsoft Learn

     

    You may try and use Filter query instead:

    endswith(filename, '.jpg') and (createdon lt 2022-01-01T00:00:00-00:00)

     

    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 April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 796

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 538

Last 30 days Overall leaderboard