cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

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 @Anonymous ,

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.

Anonymous
Not applicable

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 @Anonymous ,

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.

Anonymous
Not applicable

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.

@Anonymous ,

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.

Anonymous
Not applicable

@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!

@Anonymous ,

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
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Carousel_PP_768x460_Wave2 (1).png

2022 Release Wave 2 Plan

Power Platform release plan for the 2022 release wave 2 describes all new features releasing from October 2022 through March 2023.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Top Solution Authors
Users online (3,205)