I am using the ExactTarget API to pass subscribers from my web application to a subscribers list in ExactTarget. On my website, we post video clips on a daily basis. We range anywhere from 20 - 30 video clips a week. What I need to do is send a weekly email to each of my subscribers with a summary of the videos posted on my site for the week.

I am able to export the information about the weekly videos from my web application into an XML file. I am looking to use Automation Studio that will be triggered when the exported file is dropped into an FTP location. I also recognize that I need write an AMPScript to parse this XML. However, where to store this dynamic weekly content so I could use it in an email for every subscriber. Any insights?

1 Answer 1


Totally doable. You'll need to utilize the LookupOrderedRows() and BuildRowSetFromXML() AMPScript functions in your email to retrieve and parse the XML from the Data Extension.

Here's a lookup example from my blog:

var @rows, @row, @rowCount, @numRowsToReturn, @lookupValue, @i

set @lookupValue = "whee"
set @numRowsToReturn = 0 /* 0 means all */
set @rows = LookupOrderedRows("DataExtensionName",@numRowsToReturn,"DEColumn1 desc, DEColumn2 asc","LookupColumn", @lookupValue)
set @rowCount = rowcount(@rows)

if @rowCount > 0 then

for @i = 1 to @rowCount do

var @DEColumn1, @DEColumn2
set @row = row(@rows,@i) /*get row based on loop counter */
set @DEColumn1 = field(@row,"DEColumn1")
set @DEColumn2 = field(@row,"DEColumn2")


Row %%=v(@i)=%%, DEColumn1 is %%=v(@DEColumn1)=%%, DEColumn2 is %%=v(@DEColumn2)=%%


next @i ]%%

%%[ else ]%%

No rows found

%%[ endif ]%%

Here's an example of parsing the XML -- not exactly your scenario, but I think you can get the gist of how it might work.


set @node = BuildRowsetFromXML(@productXML,concat("/products/product[",@productPos,"]/productImageURL"),1)
set @productImageURL = Field(Row(@node, 1),'Value')


Props for going the FTP route. It's the most stable way to go about it.

  • Hi Adam, thanks for the info on the AMPScript. Are you suggesting that I store this XML data in a data extension? If so, how can I set up my email so that it will go out to my subscribers stored in a subscriber list and the content of the email coming from this xml field in the data extension? Does my question make sense? Note that the email is going to be the same for all my subscribers; the content of the email however will change weekly based on the weekly export that I perform.
    – degmo123
    Commented Jan 22, 2016 at 22:39

You must log in to answer this question.

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