We just added a new feature for developers who want to integrate with MailChimp in a really simple way. You can now "push" an email campaign to MailChimp via URL.
This is a concept we’ve used in the past for integration partners like eventbrite and SurveyGizmo. If you’ve ever used those integrations, you’ll recall that you build your event or survey, then click a link to pass stuff over to a MailChimp campaign. We called those little links "partner campaigns." They kinda work like bookmarklets.
Now we’re opening that functionality up to any developer who might want to integrate something w/MailChimp. It doesn’t require any partnership contracts, or programming with our API whatsoever, but it does require a little technical prowess.
From your app, just point to this link: http://login.mailchimp.com/partner-campaign then simply add a series of optional URL parameters to build the campaign…
After that http://login.mailchimp.com/partner-campaign link, you can add these parameters:
subject: the subject line for the created campaign
html_url: the URL for the campaign’s HTML. Using this will create a "pasted html code" campaign. No processing will be done on the HTML, so it must be email-ready.
text_url: the URL for the campaign’s text part. Again, no processing will be done.
zip_url: instead of sending the HTML, you can create a zip file that contains the HTML and all css/images that the campaign requires. We’ll upload the css/images into the user’s gallery and use the HTML for the campaign. This works exactly like "import zip file" in the campaign builder.
template_url: The URL to the HTML for a custom-coded template in the MailChimp template to use for this campaign. If the template is already in the user’s "my templates," we’ll use it. Otherwise, we’ll import your template into their "my templates" and use it for this campaign.
template_content: If you use a template, this is the array of sections and URLs to the HTML to use for that section for this particular campaign. For example, if the template in template_url defines two sections – mc:edit="main" and mc:edit="sidecolumn", you can provide this in the URL:
The content for the URLs above will be requested directly by the MailChimp servers, not the user’s browser. This means that the URLs must be publicly accessible, though they can be temporary since MailChimp will make all the requests at once while generating the campaign and never again.
If you’re an admin for a client’s CMS, you might build a simple little link into your interface that lets them push new content over to MailChimp, where we’ll plop it right into a template — then, all they have to do is hit "send" in MailChimp. If you use Shopify (the app we had in mind when building this out), you might upload a product to your site, then click a button to "promote via MailChimp." Whatever your application is, if you can make it build a link, you can integrate it with MailChimp.
Notice that you can push content into a specific HTML email template that you can code yourself. So you can make special-purpose templates for events, newsletters, sales and promotions, whatever. Just make sure you’re using our HTML email template language to code those templates.
Need your feedback
We launched this along with v5.2, so this is all fairly new stuff. We’re asking all the techies out there to give it a try, and send us some feedback.
Loosely Related (other ways to get content into MailChimp):