Avatar

Community Advisor

Hi,

 

Follow these steps:

  1. Grant marketing users createProcess right so they can use execCommand()
  2. Add a js activity before your delivery (use a js library for maintainability) that does this:
    1. Loop over inbound transition table (vars.targetSchema):
    2. For each row, use execCommand() to generate desired pdf with libreoffice (Campaign dependency). Name the files after their recipient id's. This should look something like: 
      /usr/bin/env soffice --headless --convert-to pdf --outdir /tmp file
  3. In the delivery set attachment to 'File name is computed during delivery of each message' and personalize accordingly, e.g. /tmp/<%= recipient.id %>.pdf

 

Thanks,

-Jon