Skip to main content
April 5, 2017
Question

Programatically break an email from a template?

  • April 5, 2017
  • 3 replies
  • 2094 views

We are looking to sync emails directly via the API, but template is a required field.


In my head, I have the following kludge in mind:

  1. Create Template, return template ID
  2. Approve Template
  3. Create Email from Template
  4. Approve Email
  5. Unapprove Template
  6. Delete Template

The problem is that a template cannot be deleted while there are emails attached to it. By editing the code of an email outside of editable elements in the Marketo UI, it breaks it from the template. Is there a way to do this programatically? I don't want to fill up instances with 1:1 Templates to Emails.

@David Everly​

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

3 replies

Dory_Viscoglio
Level 10
April 5, 2017

Hey Jason, in the past we've done this via a blank template. It requires that you have the API provide all of the code for the subsequent email, but it was a simpler solution than what you've outlined here.

April 5, 2017

The only issue I see here is that I need to pass the entire email, not just the contents of an editable area; the <head> contains different information for each email.

SanfordWhiteman
Level 10
April 10, 2017

What if you tokenize those areas in the <head>?

April 10, 2017

Anyone from Marketo care to chime in?          

Grégoire_Miche2
Level 10
April 10, 2017

Hi Jason,

Have given a look to the endpoint that enables to update editable sections specifically: http://developers.marketo.com/rest-api/assets/emails/#update_editable_section

-Greg