Skip to main content
Nintex Community Menu Bar
Question

Add attachments to DocGen Document

  • February 2, 2026
  • 3 replies
  • 21 views

Forum|alt.badge.img+4

I am creating a document with SharePoint list data, I also want to merge any document attachments on the list item. Has anyone done this successfully?   

Merging 1 attachment is not the problem, but merging an unknown number of attachments, I have no idea where to start with that.

Any help would be appreciated.

3 replies

Forum|alt.badge.img+4

@jschmidt7 Give this a shot:

  1. you’ll have your Item singled out
  2. Loop for each Item Attachment (Sharepoint Online > First Item in my case > Item Attachments
  3. Run If Index of loop is equal to 0
  4. Get item attachment by name where attachment name is equal to the name of the current item in the loop. 

Repeat 3 and 4 for however many attachments there could be. 

 


Forum|alt.badge.img+4
  • Author
  • Rookie
  • March 16, 2026

Thanks for the response, I guess this would work if I always knew how many attachments the item has, but in my case I do not. This needs to by dynamic, not directed toward a specific item that I know how many there are. What would be good is the ability to pass an array of files to docgen.

 


Forum|alt.badge.img+4

@jschmidt7 you just need to know the max number of attachments there could be. You can add conditional logic (so they’re included or excluded) to the templates in the DocGen action.