My email is located in Classic Content and repopulated on daily basis through API. I would like to automate this email and to make sure it uses correct email content and subject line every time it's going out. How do I retrieve email content, subject line...etc to make sure the content is up to day using ampscript?

  • I've read your question several times and I'm still not sure what you are asking, as your question is somewhat ambiguous. It appears that you are already updating an email and subject line using the API, and you want to check that the content update occurred before the email is sent. Is that correct? If so, you will need a source to compare your email to. Is the source content (e.g. email and subject line) available from an external URL? If not, what options are available to perform a compare? Commented Apr 1, 2017 at 22:10
  • When I try to create automation which contains number of queries + sending email, its uses subject line that was created at the time of automation. I was thinking using AMPScript to retrieve most recent subject line from "Classic Content" unless there is other options available? Thanks!
    – Joseph
    Commented Apr 3, 2017 at 3:30
  • You mentioned that you were using the API. Please clarify how the "subject line is created at the time of automation"? Commented Apr 3, 2017 at 3:43
  • API updates email body and the subject on daily basis. Now I want to automate email sending process that populates 2 DE using queries, waits 5 min and sends an email. I want this process to be running on daily basis but I also want the content of email to be up to date. It looks like once you automate, the automation process uses some kind of cached version you submit when you create the automation process and doesn't check for updates. My email is located in Email > Content. Sorry I'm relatively new to SFMC...
    – Joseph
    Commented Apr 3, 2017 at 3:51
  • Is it feasible for you to use the API to update Content Areas? I'm thinking you can store your subject line and email body in Content Areas instead, then use the Content Areas in the email. Commented Apr 3, 2017 at 3:55

1 Answer 1


Dynamic/Personalised Subject Line:

In Subject Line section of email:


In Email Body (either in HTML Template or Content Area):

VAR @Subject,@Date,@Name
SET @Date = FORMAT(DateAdd(Now(), "X","D"), "MMMM dd, yyyy")
SET @Name = Lookup("Customers","Name","SubscriberKey",_subscriberkey)
SET @Subject = Concat('Hi ',@Name,',The date is: ',@Date)

The subject line would be:

Hi JOHN, The date is: Saturday, April 1, 2017

You must log in to answer this question.

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