0

I'm wondering if it's possible to dynamically send an attachment with an email from marketing cloud.

In the marketing cloud, we will have contact details, based on certain criteria I want to pick a pdf file by matching the pdf name with some contact parameter, and if the pdf file matches, I want to send it as an attachment to that contact.

Also is it possible to keep all my attachments in the Marketing cloud or I need to keep in outside marketing cloud?

1 Answer 1

4

The answer to all your questions is yes:

  • you can store pdfs or other files either in Content Builder or in your sFTP
  • you can use AMPscript to attach the files to your emails
  • you can use AMPscript to dynamically match subscriber data with files and to create conditional statements
  • you can match a file based on a filename, customer key, etc.

Some examples can be found in the ampscript.guide: https://ampscript.guide/attachfile/

Here is one of the examples from ampscript.guide:

This example attaches a Content Builder asset by Customer/External Key:

%%[

var @customerKey, @fileAlias
set @customerKey = "LoyaltyMembersCB"
set @fileAlias = "LoyaltyMembers_ContentBuilder.zip"

AttachFile("ContentBuilder", @customerKey, @fileAlias)

]%%

Make sure to contact SF support to enable attachments in your account first.

3
  • 45 seconds too late.... :-( Commented Sep 16, 2020 at 15:52
  • One quick question is there any limit on attachment? Commented Sep 17, 2020 at 9:49
  • By default, your portfolio limits file sizes to 1 MB. You can contact your Marketing Cloud representative to have these limits increased, but increases in file size are not optimal sizes for email sends. The best practice for attaching files to emails is to attach the smallest possible file to avoid problems with mailbox size limits, security issues, and send speeds: help.salesforce.com/… FTP doesn't have any limits, but consider email service limits eg. 20MB for Gmail.
    – zuzannamj
    Commented Sep 17, 2020 at 9:58

You must log in to answer this question.

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