Add PDF attachments to the document

You can attach PDF files to the template. Those files will be merged with the document, to create one final PDF.


  • All the PDF attachments are stored in Salesforce
  • End-users must have permission to view those files in Salesforce
Attachment Options

Automatically Attached Files

The PDF files will always be attached in the end of the final document without end-user's intervention. This option can be used for critical attachment. End-users will notice the attachment when reviewing the document they created. They cannot remove the attachment from the final document.

The automatically attached files will appear in the final document after all the appendices assigned in the Composition Order and before the Optionally Attached Files

Optionally Attached Files

You will create a list of PDF attachments in which end-users are free to decide what they want to include in the final document. In the beginning of the document creation process, end-users can select files from that list and arrange the order. The selected PDF will attached in the end of the final document, with the order based on end-users arrangement.

The Optionally Attached Files will appear in the final document after the appendices in the Composition Order and Automatically Attached Files.

Example: List of attachment for end-users to select

Attach individual PDF files

The straight forward approach to attach any PDF file to the template, by directing to the unique Salesforce ID of the file. Attaching individual files works well if you have don't have many files to attach. This option is available for both Automatically Attached Files or Optionally Attached Files

Get Salesforce File ID

In Salesforce, go to Files tab

Look for the file that you want to get ID

At the file, select to View File Details, you will see the URL in your browser address bar similar to the example below. The series number in the end of the link is that file's ID

If you use Salesforce Classic UI, the URL may look different, but the series number is similar.

Copy the serie number and use it for the next step.

Add Salesforce File ID to the template

In Template Builder, open the template you want to add attachment

Go to Settings -> Attachments

Paste the File ID from the URL in Salesforce to the Individual PDF Files

Click Add. You will see now the file is added to the template

Now the file will be merged to the final document automatically or end-users will see them in the list to select from. Continue to add more File IDs for other attachments.

Salesforce has 2 type of IDs, the short version with 15 characters, and the full version with 18 characters. In the example above, in Lightning UI, the URL displays the full ID, while the URL in Classic UI displays the short ID. With Dynamo, both IDs work fine. You can add a short ID and Dynamo will recognize the file name and the full ID.

Attach PDF files from record attachments

Once this option is activated, all the PDF files in the record attachments will be included in the list for end-users to select. This option is good when you have  different ad-hoc documents for each record that need to be attached. This option is available only for Optionally Attached Files, to ensure the quality of the final document.