Can I use the API to grab the content for the newsletter from Drupal.
Say - we will have a php script in drupal that will pull the 5 latest articles and then constant contact should pull this data
Hi,
You can push the data to us through the API. Say you wanted to create and schedule an email in Constant Contact based on the content pulled with drupal. You would pull the content, put the content into your own html, and then create the email through our API, providing us with your HTML for the newsletter. You would them make a second call to schedule the email through our API.
Best Regards,
Shannon W.
API Support Specialist
Thanks!
Is there documentation for this process?
We don't have documentation for the process of pulling content from Drupal and putting it into an HTML email, but this is our documentation on creating and scheduling emails through the API.
Best Regards,
Shannon W.
API Support Specialist
Thanks again.
So essentially I would do something like this - http://community.constantcontact.com/t5/Documentation/Campaign-Resource/ba-p/25109
Add my html to within <EmailContent></EmailContent> - create a new campaign and then schedule an email, right?
You're welcome. Exactly, you want to put you html in the EmailContent node. One side note, you will need to html encode the email (the part within the emailcontent node), like what would be accomplished on this page:
http://www.opinionatedgeek.com/DotNet/Tools/HTMLEncode/encode.aspx
Of course, many libraries have html encoding methods that you would want to use instead of doing it manually.
Best Regards,
Shannon W.
API Support Specialist
Great!
I am looking for two such emails to go out every day and everyday we will have the php script pull the content for the newsletter.
Can I schedule the email from the same script I create the campaigne i.e., it should shcedule the email as soon as the campaign is created
Yes, you can create and schedule the email right afterward. It would be a good idea to put in a delay of 60 seconds between each call to make sure we've processed the create email request before trying to schedule it.
Best Regards,
Shannon W.
API Support Specialist
Thanks so much!