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
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Top Solution Authors
Users online (2,035)