Email attachment based on variable

Hi,

I would like to send an e-mail with an attachment. The filename is always different because I want to attach a file wich a generated before. The filename includes a variable, for example 1234.pdf or 4567.pdf.
Do you have an idea what to type in the path?
Thank you in advance!!

Hey @Sofiaxx,

Yoy may refer below posts-

Hi @Sofiaxx - Hi store that file name into a variable and pass that variable along with the entire path to the Attachment in E-mail Activity.

If you are not aware of file name. Then use Get Filename from the Directory and loop through to get Filename and then pass that to E-mail Activity.

If you want to attach all the files in one single mail, then use Attachment collection which would send it one shot.

Thanks,
AK

1 Like

@AnandKumar26 Hi Anand,

thank you for your response!
Thats what I tried to do, but it doesnt work…
maybe you can find a mistake.

Yes. It should be “.pdf”. Check that

Thanks,
AK

@AnandKumar26
yes I tried, but still cannot find the file…

Print that variable attachment and see the output. Is that giving the proper output?

Regards,
AK

yes it does!
I think the problem, was that it always opend the pdf file, i changed this and now it works :slight_smile:
thank you for your help!!

Great!!!