How to attach a generated PDF to an email

I am using  E-mail module with templates and I generated a PDF file from a page by using PDF Document Generation.  How can I attach the generated PDF file in the microflow and send it with the email as an attachment?  I didn't manage to find a good documentation about that or a video tutorial. Could you help me with that task?
1 answers

Hi Plamen,

In the flow where you create your Email object you also need to create an Attachment object with the create activity and associate it with your Email object. Then you need to copy the PDF to the Attachment object. In the new EmailConnector module there is a Java action CopyAttachmentContent, you might want to implement this, or in the CommunityCommons module the 'DuplicateFileDocument' Java action. Here you can specify source and target files.

Then you can use the IVK_SendEmail flow and the Email with Attachments will get sent. 


Hello Sjors, We tried passing the attachment object to Email but somehow it's not working,

Could you please elaborate more on this?