Looping Issue - Works on the first row but not the rest

I'm a new user. Just downloaded trial to see if I could get this working on my application.

I have the following process in a "For Each" loop in Power Automate. It seems to work well for the first row, but then won't seem to loop. I'm hoping someone has an idea?

I have a DOCX document with several rows in a table. Each row is populated with a unique string which matches a photo who's named with the same unique string.

For Each:

  • Get the photo file contents (from sharepoint).
  • Get the DOCX file contents (from sharepoint).
  • Run the Plumsail "Generate DOCX from template".
  • Save the DOCX file (to sharepoint).
  • Repeat as many times as there are records in my array.

Like I said, it works good on the first row... so I think my code/image formats are all fine. On the subsequent rows, it removes my {{fieldname}} and replaces it with a little [obj] blob, but not the photo.

Anyone know what's going on?



Followup comment:

  • This methodology feels clunky. Is there a way that I just just put an array variable into the "Template Data" field rather than having to loop it?

I was able to solve this using the forum below. Thank you!

1 Like