Handle Base64 and Binary File Content Types in Power Automate

Identification
π Binary
π Base64
{ "$content-type": "image/png", "$content": "iVBORw0KG...i/DhQmCC" }
Conversion
π Create Note Attachment from SharePoint File
Get file content action will return the SharePoint file content in Binary but creating a Note attachment requires Base64 value. Using the ['$content'] property of the output with the following expression will populate with Base64 value to the Document column.outputs('Get_file_content')?['body']?['$content']
Upload File with Binary Data
To upload the Binary data (e.g. documentbody column value of the Note attachment) to SharePoint or File data type column, base64ToBinary function can be used.base64ToBinary(outputs('Get_a_Note_Attachment')?['body/documentbody'])
Populate Word Template Image
To construct the file content for the image placeholder in the Word template with the Binary data type, ['$content'] property can be used as in the following expression.outputs('Get_file_or_image_content')?['body/$content']
Compose action step is required to construct the input for the image content using the Base64 value and populate the output of the Compose step to the image placeholder. If the content JSON is directly populated, the step will fail with the following error.
Summary
Published on:
Learn moreRelated posts
Round Robin assignments in Power Automate
When distributing tasks or tickets across a team, fairness matters, and so does flexibility. With Power Automate, we can implement a round rob...
Dynamics 365 Field Service : Use Power Automate cloud flows to automate tasks and enhance Field Service
The field service landscape is evolving fast. Customers demand quicker responses, technicians need seamless access to information, and busines...
How to generate an Excel ID to access data in Power Automate
Everyone uses Excel in one way or another, so the next logical step is to integrate it with Power Automate and create some automation on ̷...
Can Power Automate Run Python Scripts?
Python is one of the most popular programming languages for data analysis, automation, and artificial intelligence. Itβs my favorite programin...
Proactive SLA Risk Notifications in Dynamics 365 Field Service Using Power Automate & Plugins
In the world of Field Service, maintaining Service Level Agreements (SLAs) is critical for customer satisfaction and compliance. But technicia...
“Automating Renewal Reminder Emails in Dynamics 365 with Power Automate (Handling UTC Date Filtering)”
Managing subscription renewals is critical for any business offering SaaS products or long-term service agreements. Missing renewal alerts can...