Showing results for 
Search instead for 
Did you mean: 
Level: Powered On

Function "binary" not returning binary string

I am currently trying to implement masks into one of my flows.

Unfortunatelly "binary" function is very uncooperative, instead of binary string, what I get from it is base64 string... in JSON.


What I input into compose:


What I expect:


What I get:

  "$content-type": "application/octet-stream",
  "$content": "MTE="
Super User
Super User

Re: Function "binary" not returning binary string

If you'll review the Binary Forkflow Definition Language documentation, please notice that the binary function states:

Return the binary version for a string.

Meanwhile, you are inputting 11 which is an integer, not string - and that is the reason for the error. To use the Binary function with an integer, you must first convert it to a string. To do so, you can use the Compose action

If you could provide an expanded screenshot of your Flow and steps, and of any detailed error messages you're receiving we could likely better assist you.

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Level: Powered On

Re: Function "binary" not returning binary string

I am feeding it '11' not 11, which is a string...

But here it is with a "non-numerical" string, result is the same, input string encoded as base64 in JSON.


Community Support Team
Community Support Team

Re: Function "binary" not returning binary string

Hi @mrpilipo ,


I did a test on my side and the test results are consistent with yours.


It seems that the result of this function conversion has some discrepancies with the results of other binary conversions.


Basically, the content is encoded by base64() function.


Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources


New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!


Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!


Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!


Microsoft Learn

Learn how to build the business apps that you need.


Power Platform World Tour

Find out where you can attend!


Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (5,344)