Generate DOCX from T - Pictures in Lists/ Tables

I'm wanting to add x number of pictures into a table. They are sourced from a MS Form file upload. Is this possible?

Hello @Keece,

Plumsail Documents support Picture formatter in DOCX and XLSX templates. The formatter can work with base 64 picture code or a guest link. You can retrieve the pictures from the MS form and add into JSON in Create DOCX (XLSX) from template action. The template may have the tables or other elements where you can place the images.

Best regards,
Petr Bushuev
Plumsail team

Thanks for reply.

Sorry, I think I wasn't very clear in my question. I know I can put images in, but I'm trying to have a table of images. I've got the tag in a table cell in my word doc and I want to feed an array into the tag in JSON in my flow. I don't know how many images I'll need on any given occasion.
So in docx in a table: {{Image.data}:picture}
and in the Flow something like: { "Image" : [{ "data" : image data here } and so on...]

I tried it out but I just got a single blank cell (there were 2 images in the test). I'm pretty amateur-ish so it may be some error on my end, but I just want to check that what I'm doing is actually possible in the first place.

Hi @Keece,

We have an example on how to create a table with multiple table rows. What is the "image data" in you case? Is it base64 code or a link?

Best regards,
Petr Bushuev
Plumsail team

It's base64 code (I think).

Here is json that goes to docx:
[
{
"Name": "xxx",
"Date": "2020-03-06",
"JobNo": "xxx",
"Desc": "Testing flow",
"Claim": "11111",
"Pictures": [
{
"$content-type": "image/png",
"$content": "iVBORw0KGgoAAAA**(...)**"
}
]
}
]

In word doc I have table with a cell containing
{{Pictures.$content}:picture}

Is it disliking that there is a '$' in there? I'm just pulling the file content from a Get File Content from OneDrive in a loop. I'm currently testing with just 1 picture.

Nevermind!

I got it working, it must've just not liked the '$' I ran my array through a Select data operation and changed the data item to a different name and it worked fine.

1 Like