OL Learn

Dynamic PDF attachment

I’m new to emailing through workflow…I have a print context that generates individual PDF’s into a single folder, with each PDF named by a “RecipientNumber” field


So in workflow, I firstly, need to send an email, only if an email address exists in the “Email” field and secondly, if an email does exist, send the email template and dynamically attach the outputted PDF in the step above, based on the “RecipientNumber” field

RecipeintNumber = 12443
Email = tester@tester.com
Attachment = 12443.pdf

Is that possible through workflow?

It is indeed possible…

please read the following link on Email and attachment.

Basically, you have 2 ways:

  1. You generate your PDF (Create Print Content Connect plugin in Workflow), store it into a temp (or permanent) directory and attach it to an email (Workflow Send email plugin) or a HTML email (Create Email Content Connect plugin in Workflow)
  2. You generate an HTML email from Connect and check the option Print context as PDF attachment, in the Create Email Content Connect plugin in Workflow. This way, your PDF will be create on the fly and automatically attached to your email. If the email is not generated, because of a condition, then the PDF is not generated.

Great thanks, worked it out using the link you provided

Can you set a rule to not send the email if it doesn’t find a matching attachment in the above example?