Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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

 

 

 

  • Verified answer
    v-jefferni Profile Picture
    on at
    Re: File Content not available when using base64ToBinary

    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,

  • Jorge_ Profile Picture
    on at
    Re: File Content not available when using base64ToBinary

    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

     

  • v-jefferni Profile Picture
    on at
    Re: File Content not available when using base64ToBinary

    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
    Re: File Content not available when using base64ToBinary

    Hi @v-jefferni 

     

    I cannot use that action for attachments on Notes.

     

    Jorge_0-1664198467234.png

     

     

  • v-jefferni Profile Picture
    on at
    Re: File Content not available when using base64ToBinary

    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,

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >