cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jinivthakkar
Super User
Super User

File content + data:image/jpeg;base64 - AI Builder Text Recognizer

Hi Team,

 

Previously I was calling the flow from power app and I was then passing the image value like this :

 

AIFlow.Run(JSON(
        colImages,
        IncludeBinaryData
    ))

and then in the flow I was parsing json and when I use to pass the image to AI builder text recognizer it would work fine.

This is how my input use to look in this case : 

"data:image/jpeg;base64,/9j/4QBqRXhpZgAAT............."

 

 Now when I call the flow when a new file is created, I get the file content which looks like this :

/9j/4AAQSkZJRgABAQEAYABgAA

 and this gives me error

 

How can I get the image file content from SharePoint library and then pass it to AI builder text recognizer ? Or How do I make the input string like earlier ? "data:image/jpeg;base64,/9j/4QBqRXhpZgAAT............." from "/9j/4AAQSkZJRgABAQEAYABgAA"

 

When a new file is uploaded in library I need to pass it to AI builder text recognizer and extract the text.

 

Please help

 

1 ACCEPTED SOLUTION

Accepted Solutions
jinivthakkar
Super User
Super User

@CedrickB This is how I solved this :

 

jinivthakkar_0-1630150549193.png

 

 

View solution in original post

3 REPLIES 3
CedrickB
Power Apps
Power Apps

Hi,

Can you try to pass to the flow like that please?

AIFlow.Run({file:{contentBytes:First(colImages).Image, name:"MyImage.jpg"}})

Let me know if it helps.

jinivthakkar
Super User
Super User

Now the flow will run when the file is uploaded in SharePoint and there is no powerapps in picture, the flow is triggered when a new file is uploaded and when i use get file content action it gives me string like this :

 

"/9j/4AAQSkZJRgABAQEAYABgAA"

jinivthakkar
Super User
Super User

@CedrickB This is how I solved this :

 

jinivthakkar_0-1630150549193.png

 

 

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,250)