cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NLA_08
Frequent Visitor

Camera to Flow to Word document

Hi there,

 

I've been looking through the forums but I haven't really been able to find an answer to my problem.

 

I am currently creating an application in PowerApps that allows the user to take pictures and send them to an email address in a word document.

I have a flow set up using a "Populate Word" function and a Word template with "Picture Content Control" image spaces defined in it. I use the "Add Picture" function in PowerApps to take pictures and then use the .Run() command via a button to populate the word document through Flow.

I can successfully add text to the document by using the .Text extension. But the .Image extension doesn't seem to work as the Flow execution fails and gives me the "Image is not .png or .jpg format" error.

 

This is what I'm using: 'Name_Flow'.Run(TextInput.Text, UploadedImage1.Image);

 

Am I using the wrong extension, or how does this work? I am new to PowerApps.

 

KR,

 

Niels

7 REPLIES 7
WarrenBelz
Super User
Super User

Hi @NLA_08 ,

I have had this issue before with Word Image merge fields and have solved it by creating a temporary file in OneDrive with the content, naming it with a jpg extension, and then getting the content of that for the Word image. I use it for signatures, but the principle is the same.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Hi @WarrenBelz ,

 

Thanks for your reply. How do you create a temporary .jpeg file? Do you add an extra connector in Flow to delete the files afterwards? 

Hi @NLA_08 ,

Just use Create File in the OneDrive connector in the Flow with the content you are sending. You do not have to delete if if you do not want to as the next one will overwrite it.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

NLA_08
Frequent Visitor

Hi @WarrenBelz ,

 

Thanks for this solution. However, the app in question is a workplace inspection app. Which means that there will be multiple pictures taken that each need to be placed inside a category in the generated Word document (Up to 30 pictures). Furthermore, this app will be used by over 50 people, so chances are that they'll be using it simultaneously. I reckon this solution works well with 1 or 2 pictures, but I don't feel like it'll work well in my situation.

Would there be another way to do this perhaps?

 

Thanks.

@NLA_08 ,

The OneDrive is the User's so concurrency will not be an issue. Also I am assuming you are merging multiple photos into separate Picture elements, so you may have to do a (numbered) file for each. I do this on a number of forms with a couple of signatures.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

NLA_08
Frequent Visitor

@WarrenBelz , 

I currently made a temporary folder in SharePoint to store the folders, but OneDrive is indeed a better idea. 

About the merging of picture elements, how would this be done? Because I can only use 1 picture at the moment, I don't really know how to export multiple. I do have a Word template with different named placeholders, I just can't get the pics in them... 🙂

thank you for the information provided already!

@NLA_08 ,

You cannot merge them (at least programmatically), which is why I mentioned the separate files and Word merge fields. I do dozens of these daily with signatures and up to two photos on a couple.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,911)