We are trying to launch an automated email that consists of our product blog content to be sent every time there is a new blogpost worth sending out.
It turns out that that in order to do this via API calls we need is to be able to clone a program, update its email body and schedule corresponding campaign when we think that we have new content to send.
The problem is that I don’t see an easy way to update content of an email (not headers but actual body). As i see from API documentation, everything that I can do in order to update email body is to call updateEmailTemplateContentById with email’s corresponding template and it doesn’t affect approved templates.
So the question is how can I update existing email body via REST API? Does our workflow look ok?
Or may be there is a much more simple way of doing this that i'm missing out?
Solved! Go to Solution.
The typical flow is not to update the email asset itself, but to use a My Token instead of having embedded content. You then pass your syndicated content in as a replacement my token via the Schedule Campaign call, similarly to what's shown here: http://developers.marketo.com/blog/sending-transactional-emails-with-the-marketo-rest-api-part-2-cus...
The typical flow is not to update the email asset itself, but to use a My Token instead of having embedded content. You then pass your syndicated content in as a replacement my token via the Schedule Campaign call, similarly to what's shown here: http://developers.marketo.com/blog/sending-transactional-emails-with-the-marketo-rest-api-part-2-cus...
Our average email size will be a couple of kilobytes. So are we able to transfer whole content of an email through My Token? Right?
Sure.
Hi Kenny Elkington,
We are executing the same process: use API to clone the program and call Schedule Campaign to replace my token embedded in the email. However, when we sent the email under the new cloned program, the tokens embedded in the email did not display the correct token value, instead, they displayed the below text:
Dear ${lead.First_Name_1_0},
${my.My_Token_1_0}
How can I fix this? Thank you!
There's not much to go on here, and I'm not sure what might cause this. Support should be able to help you triage this. Please provide any example calls, responses, assets and leads that you can.
Answered here: https://nation.marketo.com/message/167709-re-tokens-dont-work-under-the-program-cloned-by-rest-api#c...