cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MeSan
Helper III
Helper III

Pass image object from power apps to power automate flow

 

Hi everyone I hope you're doing well,

 

I've built a flow in which I have a simple power app as a trigger, then a populate word document step and after that a step to convert the populated document into pdf and lastly a step to send an email. Here is the structure :

MeSan_0-1619201337263.png

 

I have an image field to populate in the word document and I gave it as a parameter askinpowerapps, but when I run the flow in the power app I get this error : The image is not of type PNG or JPG. Please provide an image of type PNG or JPG.

I know that power apps only returns me the reference to a cached image, not the image itself. But I have no idea how to directly get the image object from the power app, is it hidden somewhere in the app so I can access it ?

 

PS: My image is in a SQL Server table and was declared this way :

MeSan_1-1619201474581.png

And whenever I add a new item through the power app to this table, I upload an image file as well and it is stored like this in my table :

MeSan_2-1619201543380.png

 

Can anyone help me with this please I'll highly appreciate

Thanks in advance !

12 REPLIES 12
Achavan
Resolver II
Resolver II

Hi @MeSan ,

1. Initialize variable

Achavan_0-1619415275138.png

 here, 

output is your text getting from Power apps i.e. 0xFFD....

 

2. Save this object in compose

Achavan_1-1619415361544.png

 hope this helps !

 

Please click Accept as Solution if my post is helpful to you. 

 

MeSan
Helper III
Helper III

Hello @Achavan ,

Yes this sounds a nice solution but when I want to set the variable I don't see the image field in the list :

MeSan_0-1619430431165.png

Do I need to do a specific configuration ?

Thanks in advance.

 

First you have to initialize variable of type object -

Achavan_0-1619430829775.png

 

 

Okey thanks @Achavan 

I don't understand where this variable comes from :

MeSan_0-1619431978165.png

do I need to define it somewhere ?

 

Achavan_0-1619434457297.png

in your case, you have to add this output  0xFFD.......... 

MeSan
Helper III
Helper III

Okey but when I try to save the flow I get this message :

MeSan_0-1619434842548.png

and previously no error was mentioned 😕

Any idea where does this come from ?

@AchavanHere is how I've structured the flow :

MeSan_0-1619436016616.png

 

yes, now use this compose to populate image.

 

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

Yes @Achavan  I use it in the populate image field :

MeSan_0-1619438320571.png

But I'm getting a strange error while trying to save the flow :

MeSan_1-1619438374607.png

I can't save the changes..

MeSan_2-1619438411695.png

Where does this come from plz ?

can you please share output expression ?

Achavan_0-1619450450971.png

 

@Achavanthe outputs function has as parameter an "ask in power apps" which is supposed to be the image reference :

MeSan_0-1619468988385.png

And I should pass it to to flow button when linked with the power app. Is this the right way of doing it ?

Mira_Ghaly
Dual Super User II
Dual Super User II

@MeSan

Can you please check my last reply on the below topic:

https://powerusers.microsoft.com/t5/Building-Flows/generate-pdf-from-powerapps-HtmlText-with-images/...

 

 

If this post helps you with your problem, please mark your as Accepted solution.If you like my response, please give it a Thumbs Up.

Blog: here

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (16,877)