You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I successfully connected to my MailChimp account and managed to create a new campaign. The scenario would be that every time I create a new 'newsboard' in my application I create a MailChimp Campaign using a template and the content of the newsboard. I am trying to use MailChimp Template Language for this: http://templates.mailchimp.com/getting-started/template-language/
var optionsObj = {
list_id: 'xxx',
subject: 'xxx',
from_email: 'xxx',
from_name: 'xxx',
template_id: 'xxx',
to_name: 'xxx',
};
var contentObj = {
sections: {
"header": 'Test Header title!',
"header2": 'Test Header title 2!',
"date": 'Test Date'
}
};
//Mailchimp call
api.call('campaigns', 'create', { type: 'regular', options: optionsObj, content: contentObj }, function(error, data) {
if (error)
console.log(error.message);
else
console.log(JSON.stringify(data)); // Do something with your data!
//send it
});
In the MailChimp Template editor I have the following HTML code:
I successfully connected to my MailChimp account and managed to create a new campaign. The scenario would be that every time I create a new 'newsboard' in my application I create a MailChimp Campaign using a template and the content of the newsboard. I am trying to use MailChimp Template Language for this: http://templates.mailchimp.com/getting-started/template-language/
In the MailChimp Template editor I have the following HTML code:
Is there another way to do this or get around, or am I doing something wrong?
The text was updated successfully, but these errors were encountered: