I am integrating the Campaign Monitor API into my custom CMS. There are 900+ members that each get a daily newsletter, which I am using Campaign Monitor.
Each newsletter has custom article HTML inside a standard template. Which means I have to:
1.) loop through the subscribers for a list (the following is done inside the loop)
2.) do a cms lookup for the companies the member wishes to view articles from, and then lookup the articles for those companies, and then get the HTML to put into the template.
3.) create a list with the subscriber in the loop
4.) create a campaign, create the Html Url with the custom article HTML in it
5.) run the send function for that campaign to the list with the subscriber in it
6.) delete the campaign with the campaign function, delete the list... because I do not want to store 900+ campaigns/list each time the newsletters get sent
7.) log the results
My question is: Can I loop through all of the subscribers in a list, create a list, put the subscriber into that list, create a campaign, send the campaign, and then delete the campaign and list... in each iteration of the loop??
The concern is that I will only know which articles to put into a campaign once I do a cms lookup for that member. Members can change their article settings whenever they want...