I came across a requirement where I need to archive the email sent to customer as PDF onto a different Archival platform.

I currently have the preview links synced to Salesforce, which expires after 180 days. Is there a way to move these emails as PDF to FTP?

I tried converting the html (by a get request to preview URL), but that does not seem an ideal way. Also the pdf is generated with html tags.

Is there a way to do this a better way?

  • Should this happen once per send or for every indivual email with personalization?
    – DonL
    Nov 19, 2020 at 13:49
  • for every individual with personalization
    – ipradhansk
    Nov 19, 2020 at 14:09
  • To Make this question even harder [maybe i need to create a case for this], When i have a dynamic email and multiple languages and countries therefore different content, how can i store the pdf once per language country combination? And as fast as possible after the send process Nov 19, 2020 at 14:09
  • 1
    I'd have to imagine this would require setting up a BCC for every email and having an external process archive emails as PDFs separately and another process to marry that with contacts, but I'm not sure the tools needed to do that. Nov 19, 2020 at 14:24
  • In that case I would also go with BCC. I have also seen a solution where somebody would use JEE to grab those BCC emails and generate pngs. This would obv. also work for pdf outputs. Maybe if you talk to your client he would be already okay with having all emails stored in that BCC inbox.
    – DonL
    Nov 20, 2020 at 7:15

2 Answers 2


There is really nothing you can do, to implement this natively in SFMC. My idea for such a solution would be following:

  1. Store the VAWP URL in sendlog. It will provide you with the web version of that unique email you have sent - which you will use to get the HTML.
  2. Create an automation which e.g. once every hour queries the sendlog and identifies entries not yet processed (using Query Activity) and places these in a separate data extension
  3. Create an instance of AWS Lambda, with an HTML renderer (like wkhtmltopdf) on it, and AWS S3 bucket to store the PDFs. This solution description is beyond the scope of SFSE, and I am confident other communities on StackExchange network can provide some advice.
  4. This lambda instance should expose an endpoint, which will receive the VAWP URL and a unique identifier. This identifier will be used to create the filename.
  5. For queueing purposes, you can consider AWS SQS, to ensure the wkhtmltopdf process will not be flooded with requests from SFMC.
  6. In SFMC, you should set up a Script Activity with SSJS which takes unprocessed records from the data extension described in #2, and provides the VAWP and unique identifier to SQS, marking the record as processed in sendlog.
  7. wkhtmltopdf will, once done, place the PDF files in your S3 bucket.

I know the above items are not described in adequate details to follow them and create the solution (especially when talking AWS components), but it should give you an idea on in which direction you should focus your efforts.

  • The success of this solution hinges on the send audiences not being overwritten before the archival process takes place. If the send context is gone, the scripting in the VAWP version won't render. Nov 19, 2020 at 14:43
  • I agree with you, Adam, that this is not bulletproof - as VAWP has this exact weakness. It can be overcome by implementing the sendlog based VAWP as described here or by simply ensuring the updates of the sendable DE will be reduces to e.g. once every 24 hours Nov 19, 2020 at 14:51
  • VAWP being overwritten is something that is closely connected to normal send processes. If you chose JourneyBuilder for this SendProcess the JourneyBuilder keeps the Data for you, therefore the VAWP Link does not break as easily as it would with usual send processes. Well written Lukas -> Seems i should invest more time into processes and possibilities of AWS. You won't hold a webinar for that, right? :( Nov 19, 2020 at 14:54
  • @JohannesSchapdick I would love to do this one as a POC, but lack the time between my billable work. Nov 19, 2020 at 15:06
  • thanks @LukasLunow for the detailed approach. this would involve a great development effort, and multiple services involved...found out from support that we can archive as .eml file as a standard feature with additional cost...need to decide trade-off now :)
    – ipradhansk
    Nov 20, 2020 at 10:24

SFMC does (or used to) offer SFTP archival but it is (or was) pricey. I'm not sure it's in PDF form.

I've seen a ton of different ways of mirroring rendered HTML via VAWP at send time, but this is an exercise in futility as the scale of data is way too large to manage in SFMC. VAWP is fragile for various reasons and often not a 100% bulletproof solution.

The BCC option effectively costs a send and shifts the archival effort outside of the platform. This is the solution I've seen most often.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .