Skip to main content
Nintex Community Menu Bar
Solved

Need to store a file in a loop and have the attachment in a email

  • December 10, 2024
  • 1 reply
  • 77 views

Forum|alt.badge.img

Okay so I have a problem I am trying to go through and a attachment file and make sure that attachment goes on a email. Here is the screen shots that I am using. 

 

Best answer by SteveBarnard

Hi

In my example

  1. I query my document library to get the files that I want to attach to the email
  2. I then loop through the items collection within the Files object that is returned by the Query a list
  3. Query a list does not return the actual file (from what I can see) so I then use the “Get a File by ID” within the loop to retrieve the file.
  4. Inside the same loop I then add the file to a collection, which will then be used in the attachments section of the email event.

Example Workflow (Export Key : NKCEqdDFwm3V7pqP6QMpm9zzqFkrPehEuTCefJueAAvTDorCa)

 

1 reply

Forum|alt.badge.img+5
  • Nintex Employee
  • Answer
  • December 11, 2024

Hi

In my example

  1. I query my document library to get the files that I want to attach to the email
  2. I then loop through the items collection within the Files object that is returned by the Query a list
  3. Query a list does not return the actual file (from what I can see) so I then use the “Get a File by ID” within the loop to retrieve the file.
  4. Inside the same loop I then add the file to a collection, which will then be used in the attachments section of the email event.

Example Workflow (Export Key : NKCEqdDFwm3V7pqP6QMpm9zzqFkrPehEuTCefJueAAvTDorCa)