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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Create Note with attachment from binary file content

(4) ShareShare
ReportReport
Posted on by 67

Hello everyone,

I'm currently working on a Power Automate flow where I receive an attachment from Copilot Studio and would like to add it to a note in Microsoft Dynamics. The attachment is passed to Power Automate via a contentUrl and converted from JSON to in binary format.

Unfortunately, I'm unable to use the binary content directly when creating the note, and I'm also unable to convert it to Base64. Additionally, using SharePoint to create the file isn't an option, as doing so breaks the Copilot-to-Automate handoff.

Has anyone successfully managed to convert a binary file from a contentUrl into a format that can be used as an attachment in a Dynamics note—without relying on SharePoint?

Any insights or alternative approaches would be greatly appreciated!

 

Best regards,

Categories:
I have the same question (0)
  • André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at
    Can you tell us what Dynamics 365 application this question is related to? There are several different solutions in the Dynamics 365 family, like: Sales, Finance, Supply Chain Management, Project Operations, and Business Central. 
  • LP-15050648-0 Profile Picture
    67 on at
    Dynamics Sales 
  • Ravitheja J Profile Picture
    6 on at
    Hi, did you try extracting the base64 content from the contentUrl? 
     
    You can convert the contentUrl to JSON by using Parse JSON action, and then try using an expression similar to split(jsonvariable('contentUrl'),',')[1] to extract the base64 content. 
     
     
  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    Hi there,

    This is a common challenge when working with binary content from contentUrl in Power Automate, especially when integrating with Dynamics 365 Notes.

    Here’s a possible approach that avoids using SharePoint:

    1. Use HTTP Get to Retrieve the File:

      • Use the HTTP action in Power Automate to fetch the file from the contentUrl.
      • Ensure the response is set to return binary content.
    2. Convert Binary to Base64:

      • Use the base64() expression in Power Automate to convert the binary content:
     
    base64(body('HTTP'))
      • This will give you a Base64 string that can be used in the Dynamics 365 Create Note action.
    1. Create Note with Attachment:

      • Use the Dataverse Create a new row action for the Annotation table.
      • Populate the following fields:
        • Subject: Your note title
        • Document Body: The Base64 string
        • File Name: Name of the attachment
        • Mime Type: e.g., application/pdf or image/png
        • Regarding: Link to the related record

    Make sure your flow has the necessary permissions to access the file and create records in Dataverse.

    Let me know if you'd like help building the flow or troubleshooting the conversion!

    Please verify if this response was helpful.

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 137 Super User 2025 Season 2

#2
#ManoVerse Profile Picture

#ManoVerse 57

#3
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans