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

Community site session details

Session Id : GxG06EJmr87FhHcNs0tmfN
Power Automate - Building Flows
Answered

Computer Vision API - Can't convert to binary from Base64

Like (0) ShareShare
ReportReport
Posted on 1 Sep 2021 07:05:45 by 21

Hi,

I am using Computer Vision API action Optical Character Recognition (OCR) to Text

I have a canvas app that takes a picture and triggers a flow.

When the flow runs it does not recognise the text.

I have built my Flow based on the examples online. 

 

As per my understanding I need to convert the base64 text to binary for the OCR to read the image.

However I get an error when  I try to convert it :

 

Unable to process template language expressions in action 'Compose_2' inputs at line '1' and column '8993': 'The template language function 'base64ToBinary' was invoked with a parameter that is not valid. The value cannot be decoded from base64 representation.'.

 

My flow:

 

ocr_error.JPG

If I do not convert the image 

 

Any ideas ?

Stanley

  • Verified answer
    Stanza Profile Picture
    21 on 03 Sep 2021 at 02:53:18
    Re: Computer Vision API - Can't convert to binary from Base64

    Ok here's the news, turns out the API doesn't recognise handwritten running writing (at the moment).

    I scanned an image with block text and it worked !

     

    Stanza_1-1630637882608.png

     

     

    Stanza_0-1630637787574.png

     

  • Stanza Profile Picture
    21 on 02 Sep 2021 at 06:32:36
    Re: Computer Vision API - Can't convert to binary from Base64

    Hi @rrovira,

     

    I managed to get rid of the error. However, now the Flow runs with no error but I am getting blank text, so the API is not detecting my image.

     

    blankocr.JPG

     

    PowerApps setup is:

    PowerApps button to capture image:

    OnSelect:

     

    ClearCollect(PicCollection, Camera1.Stream)

     

     

     

    PowerApps button to send to Flow:

    OnSelect:

     

    TakePictureV2.Run(First(PicCollection).Url)

     

     

     

    Flow setup:

    ocrIssue.JPGocrIssue.JPG

     

    I am under the impression that we need to convert using dataUriToBinary function so I have supplied the photo.url as input from PowerApps. 

    I have also created the file in OneDrive as per the examples on the internet. 

    The files I have scanned are below. Is the API not able to recognise these images? 

    I have tried using a business card and same result - all return blank

     

    hello.pnghandwriting.png

  • rrovira Profile Picture
    Microsoft Employee on 01 Sep 2021 at 17:54:20
    Re: Computer Vision API - Can't convert to binary from Base64

    Hello, @Stanza!

     

    What kind of data is the second compose returning? Are you sure it's returning a Base64 string? 

     

    Cheers,

    Rodrigo!

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

Telen Wang – Community Spotlight

We are honored to recognize Telen Wang as our August 2025 Community…

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Tomac Profile Picture

Tomac 986 Moderator

#2
stampcoin Profile Picture

stampcoin 699 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 577 Super User 2025 Season 2

Loading complete