Attach files

Hi.
I have variables “email” and “name”. I have a folder of pdfs called name.pdf.
How do I attach the pdfs corresponding to their email using the variable?

I’m not sure I follow. You can put the email variable in the “To:” property of the send email activity, and the ‘name’ variable in the “attachments” property.

Hey @eoch,

I’ve attached a screenshot below that should hopefully be helpful. What you can do is use a for each file loop to have the attachment name changed to each one in the folder, and then have that email sent for each one. Let me know if this doesn’t work.

Hi @eoch

We can use >Directory.GetFile(“YourFilepath”,"*.pdf") in attachment collection of the mail activity of what you re using!

Regards