
Hello!
I have a flow to create an HTML-file of all sharepoint list items. I use an Apply to Each to put new rows in the html table using append to string variable:
This working perfect, and is generating my HTML-file as expected.
Each item in the sharepoint list also has 1 attachment, this is always an image.
I'd like to show that image in the generated table as well using the <img> tags, but I fail to get the flow correct. This is my first flow ever and it feels like I hit a wall.
I have a feeling that I should initialize an Array variable, and append the attachment content to the variable.
I can't get the images to show up in the html-file.
I'm guessing this is something pretty easy, but I'm stuck on it for 2 days now so I could use some help 🙂
Thanks in advance,
Kjeld
Hi @kjeldlarmit ,
Pls refer the below sample flow to embed image in the html file:
In image tag 'img', content type & content are passed to embed it in html file.
<img src="data:@{outputs('Get_attachment_content')?['body']['$content-type']};base64,@{outputs('Get_attachment_content')?['body']['$content']}" />
If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.
Thanks