One or more certificates of achievement are emailed to each person listed in the spreadsheet

How to send one or more certificates attached as PDFs using mail merge.

Each person may have completed a number of courses, so instead of sending them multiple emails with a single attachment, one email is sent with multiple attachments.

pdfMachine merge uses a PowerPoint template and a CSV data source. pdfMachine merge will iterate through the rows of the data source generating a personalized PDF attachment for each row, the merge fields are replaced with the appropriate data from each row. On reaching a change in email address, pdfMachine merge will send an email with the generated PDFs as attachments. Both the email and the attached PDFs are personalized with information from the corresponding rows.

Step 1. Create an Excel spreadsheet where the column headings are 'merge fields'.

See how.

Create a data source (this one is a CSV file) that has merge fields as column headings. Each row must have an email address. Create consecutive rows with the same email address to have that data bundled as attachments to one email.

In this example four emails will be sent.

  • The first will have 4 attachments
  • The second will have 2 attachments
  • The third will have 1 attachment
  • The fourth will have four attachments

Step 2. Create a Powerpoint template, using {{curly braces}} around merge fields.

The names of the merge fields must exactly correspond to the column names in the data source. The merge fields can be formatted using the Liquid Templating Language.

Step 3. In pdfMachine merge, press 'profiles' then the pink + button to create a new profile.

Step 4. Select the Excel or CSV you created as the 'data source'.

Step 5. Set 'rows to email' to 'each row creates an attachment'.

Step 6. Set the email merge field and email subject.

Step 7. Set the email body with merge fields surrounded by {{curly braces}}

Step 8. Add the Powerpoint document as a 'dynamic PDF attachment'.

Step 9. Start sending emails

Do a test first, sending a few emails to yourself. When happy with the results, start sending emails.