<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Create marketing email via api issue in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908877#M70448</link>
    <description>&lt;P&gt;&lt;SPAN&gt;I'd like to share my overall objective and see if you can assist me&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;I want to create a sequence (or a workflow if sequence isn't possible) that, upon enrollment of a specific contact, triggers the automatic sending of a transactional email&amp;nbsp;&lt;SPAN&gt;(or a marketing email if a transactional one isn't possible). The email should contain dynamic content, such as the contact name and a link that varies from one contact to another.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I intend to achieve all of this exclusively through the API, involving the following steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Creation of an email template&lt;/LI&gt;&lt;LI&gt;Creation of the email itself&lt;/LI&gt;&lt;LI&gt;Creation of the sequence or workflow&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;I appreciate your assistance!&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Sat, 20 Jan 2024 15:09:59 GMT</pubDate>
    <dc:creator>DorL</dc:creator>
    <dc:date>2024-01-20T15:09:59Z</dc:date>
    <item>
      <title>Create marketing email via api issue</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908103#M70415</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm currently working on creating a marketing email using the following request:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;POST&amp;nbsp;&lt;SPAN&gt;/marketing-emails/v1/emails/&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;const&lt;/SPAN&gt; &lt;SPAN&gt;body&lt;/SPAN&gt; &lt;SPAN&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; {&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;name&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'Test marketing email'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;subject&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'My email subject'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;state&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;'AUTOMATED_DRAFT'&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;emailBody&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;`Hi You {{contact.firstname}}`,&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&lt;SPAN&gt;templatePath:&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN&gt;'@hubspot/email/dnd/welcome.html'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;P&gt;While the email is successfully created, I've encountered an issue where the email body remains the default template body instead of the custom body I included in the request.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could you please advise on the necessary steps to resolve this issue?&lt;/P&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 18 Jan 2024 23:23:28 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908103#M70415</guid>
      <dc:creator>DorL</dc:creator>
      <dc:date>2024-01-18T23:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create marketing email via api issue</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908190#M70419</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/695082"&gt;@DorL&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As per this &lt;A href="https://legacydocs.hubspot.com/docs/methods/lists/marketing-email-overview" target="_blank" rel="noopener"&gt;(Legacy) HubSpot API doc&lt;/A&gt;, the "emailBody" parameter sets &lt;EM&gt;"the main content of the email &lt;STRONG&gt;within the 'main email body' module&lt;/STRONG&gt;"&lt;/EM&gt;. As such, in your email template, you'll need to make sure you're using this "main email body" module. For example:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;&amp;lt;!--
    templateType: email
    isAvailableForNewContent: true
--&amp;gt;
&amp;lt;!doctype html&amp;gt;
&amp;lt;html&amp;gt;

...

  &amp;lt;body&amp;gt;
    {% content_attribute "email_body" %}
      The content you send via API as "emailBody" should appear here.
    {% end_content_attribute %}

...

  &amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;More information about the "Main email body" can be found &lt;A href="https://knowledge.hubspot.com/design-manager/use-default-modules-in-your-template#main-email-body" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this proves useful. Please let me know if you have any follow-up questions.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 03:35:18 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908190#M70419</guid>
      <dc:creator>zach_threadint</dc:creator>
      <dc:date>2024-03-05T03:35:18Z</dc:date>
    </item>
    <item>
      <title>Re: Create marketing email via api issue</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908258#M70421</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/324811"&gt;@zach_threadint&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;P&gt;If I want to use a default drag-and-drop template, what should I do? (like welcome or simple templates)&lt;/P&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 19 Jan 2024 10:05:27 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908258#M70421</guid>
      <dc:creator>DorL</dc:creator>
      <dc:date>2024-01-19T10:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: Create marketing email via api issue</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908777#M70444</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/695082"&gt;@DorL&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Just make sure you use 1 "Main Email Body" module in your email template. That should do the trick.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="Screenshot 2024-01-20 at 11.14.12.png" style="width: 999px;"&gt;&lt;img src="https://community.hubspot.com/t5/image/serverpage/image-id/107486iEFAA8886E3280322/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-01-20 at 11.14.12.png" alt="Screenshot 2024-01-20 at 11.14.12.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this proves useful. Please let me know if you have any follow-up questions.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 03:34:52 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908777#M70444</guid>
      <dc:creator>zach_threadint</dc:creator>
      <dc:date>2024-03-05T03:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: Create marketing email via api issue</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908877#M70448</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I'd like to share my overall objective and see if you can assist me&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;I want to create a sequence (or a workflow if sequence isn't possible) that, upon enrollment of a specific contact, triggers the automatic sending of a transactional email&amp;nbsp;&lt;SPAN&gt;(or a marketing email if a transactional one isn't possible). The email should contain dynamic content, such as the contact name and a link that varies from one contact to another.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I intend to achieve all of this exclusively through the API, involving the following steps:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Creation of an email template&lt;/LI&gt;&lt;LI&gt;Creation of the email itself&lt;/LI&gt;&lt;LI&gt;Creation of the sequence or workflow&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;SPAN&gt;I appreciate your assistance!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 20 Jan 2024 15:09:59 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/Create-marketing-email-via-api-issue/m-p/908877#M70448</guid>
      <dc:creator>DorL</dc:creator>
      <dc:date>2024-01-20T15:09:59Z</dc:date>
    </item>
  </channel>
</rss>

