Rendering Emails as PDFs in Salesforce Marketing Cloud

Converting Salesforce Marketing Cloud Engagement emails into PDFs can be a required step for documentation, compliance, and archiving. While Salesforce provides various solutions for PDF rendering, not all are fully compatible with Salesforce Marketing Cloud (SFMC). This insight explores different methods to convert emails into PDFs and automate the process wherever possible.

Manual PDF Rendering

For users who need a straightforward approach, saving an email as a PDF manually is an option:

  1. Open the email message.
  2. Click on the File tab and select Print.
  3. From the Printer drop-down, choose Microsoft Print to PDF.
  4. Click Print.
  5. In the Save Print Output As box, select a folder, enter a file name, and click Save.

Using Chrome Extensions

Several Chrome extensions can facilitate PDF conversion, including:

  • Fireshot – A popular tool that captures entire webpages and saves them as PDFs.

Using Sejda for PDF Conversion

Sejda is a free online tool that preserves links and other embedded elements while converting emails to PDFs. It can be an excellent solution for one-off conversions where maintaining interactivity is important.

Email Archiving in Salesforce

Salesforce offers an Email Archiving Add-On that can store emails for compliance and retrieval. However, this solution is more focused on archiving than rendering emails into PDFs.

Automating PDF Rendering in SFMC

For those looking to automate PDF generation, a structured approach using AWS services and SFMC data extensions is possible.

Steps to Automate PDF Rendering

  1. Store the Web Version URL
    • Each sent email has a View As Web Page (VAWP) link.
    • Store this VAWP URL in Sendlog to retrieve the unique web version of the sent email.
  2. Create a Query-Based Automation
    • Set up a Query Activity that runs periodically (e.g., hourly) to fetch unprocessed VAWP URLs from Sendlog.
    • Store these entries in a separate Data Extension for processing.
  3. Set Up an AWS Lambda Function
    • Deploy an AWS Lambda instance with an HTML rendering tool like wkhtmltopdf.
    • Use an AWS S3 Bucket to store generated PDFs.
    • This function should expose an endpoint to receive the VAWP URL and a unique identifier (which will be used as the filename).
  4. Implement Queueing with AWS SQS
    • To prevent system overload, an AWS Simple Queue Service (SQS) can manage requests from SFMC to Lambda.
  5. Integrate SFMC with AWS Services
    • Create a Script Activity using Server-Side JavaScript (SSJS) to:
      • Fetch unprocessed records from the Data Extension.
      • Send the VAWP URL and identifier to AWS SQS.
      • Mark the record as processed in Sendlog.
  6. PDF Storage and Access
    • Once the rendering process is complete, wkhtmltopdf stores the output in AWS S3.
    • Users can access the PDFs as needed.

Alternative AppExchange Solutions

For those looking for pre-built solutions, Salesforce AppExchange offers various options, such as Sercante, which specializes in PDF generation and marketing automation integrations.

Conclusion

Converting emails to PDFs in SFMC can be done manually, with browser extensions, or through automated solutions using AWS services. The right choice depends on your needs, whether it’s one-time conversion, compliance archiving, or a fully automated workflow.

Content updated February 2025.

Salesforce Partner
salesforcepartner
Related Posts
Salesforce OEM AppExchange
Salesforce OEM AppExchange

Expanding its reach beyond CRM, Salesforce.com has launched a new service called AppExchange OEM Edition, aimed at non-CRM service providers. Read more

The Salesforce Story
The Salesforce Story

In Marc Benioff's own words How did salesforce.com grow from a start up in a rented apartment into the world's Read more

Salesforce Jigsaw
Salesforce Jigsaw

Salesforce.com, a prominent figure in cloud computing, has finalized a deal to acquire Jigsaw, a wiki-style business contact database, for Read more

Service Cloud with AI-Driven Intelligence
Salesforce Service Cloud

Salesforce Enhances Service Cloud with AI-Driven Intelligence Engine Data science and analytics are rapidly becoming standard features in enterprise applications, Read more

author avatar
get-admin