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

Pull images from form responses and put into word template

I am looking to pull multiple images from forms responses and put them in my word template.

I have 2 different questions in my form that will require the respondent to upload at least one if not 2 photos for each question.
5 REPLIES 5
Jcook
MVP

Hello @acruickshank
Check out this solution:
https://powerusers.microsoft.com/t5/Building-Flows/Pull-uploaded-image-from-Form-and-put-in-Word-Tem...

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





acruickshank
Frequent Visitor

@abm  Do you know how I can do this?

? I am confused. @abm has helped you in the last post.

What is different from that solution to this one?

If it is just multiple pictures. All you will have to do is follow the steps for each question.

If there is multiple pictures per question than you can use a loop.

—Josh
If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others

Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips,
tricks, and guides
FlowAltDelete





Hi @acruickshank 

 

You need to duplicate the steps. I did tried at my end and normalised the JSON For each loop. This way you don't need to iterate via For Each Loop. It just another way getting the filename. Here are the steps you need to follow:

 

image.png

 

Next we need to get the first image name. So here I am using the JSON structure to evaluate the image filename.

 

image.png

 

 

 

 

The schema is as follows:

 

{
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"link": {
"type": "string"
},
"id": {
"type": "string"
},
"type": {},
"size": {
"type": "integer"
},
"referenceId": {
"type": "string"
},
"driveId": {
"type": "string"
},
"status": {
"type": "integer"
},
"uploadSessionUrl": {}
},
"required": [
"name",
"link",
"id",
"type",
"size",
"referenceId",
"driveId",
"status",
"uploadSessionUrl"
]
}
}
 
The expression I used is 
body('Parse_JSON_2')[0]['name']
 
Next we need to get second image name. So replicate the same steps above but some of the mapping are slightly different. Here it is.
 
image.png
 
Use the same JSON schema as above. The expression I used above is
body('Parse_JSON')[0]['name']
 
At this stage we have two image file names.
 
Next we need to use the Get file content using path. In your case you have two images so we need to use two action steps. Change the file path accordingly and map the correct output of the Image 1 and Image 2. 
 
image.png
 
Next steps add your Microsoft Word Template and finally create the file.
 
image.png
 
If you have any questions please let me know.
 
Thanks


Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
abm
Super User
Super User

Hi @acruickshank 

 

Do you need any further help in this? If the suggested response is working then please mark it as solution accepted.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

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.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Users online (4,280)