Reputation: 46
I'm trying to build a Word doc generator. Data is held in a SharePoint list (text, person info, images), and is then inserted into a Word template via Power Automate. There will be many entries in the list, all with unique data and images.
The Image fields are native SP Image columns, not hyperlinks. They will be uploaded each time the form is completed.
The problems I'm having are:
While the text fields show up on Quick Parts, none of the Image fields do, so I can't insert them.
I can manually add picture controls to the Word template, but in Power Automate, the Image fields aren't shown in Dynamic Content even though "Populate a Microsoft Word template" shows the Picture content controls.
Does anyone know why they don't show, and how I can get the Image fields to be added to the Word doc? Or, am I doing it the wrong way, and I should use attachments - in which case, how do I do that for multiple attached images?
Upvotes: 1
Views: 3851
Reputation: 411
Try as following to retrieve a single item's Image column value in Power Automate:
1.Send an HTTP request to SharePoint (where Image is internal name of Image column):
2.Initialize a variable with an expression that gets the fileName of the image:
Name: ImageName
Type: String
Value: json(body('Send_an_HTTP_request_to_SharePoint')?['d']['Image'])['fileName']
3.Get file content using path:
4.Populate a Microsoft word template use the file content:
Result for your reference:
Similar issue for your reference:
Upvotes: 2