<?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: build marketing email via api. - Table with tokens (fields) in APIs &amp; Integrations</title>
    <link>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/803387#M64633</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/381889"&gt;@karien&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please mark it as Solution Accepted and upvote to help other Community member.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
    <pubDate>Tue, 06 Jun 2023 11:19:53 GMT</pubDate>
    <dc:creator>GRajput</dc:creator>
    <dc:date>2023-06-06T11:19:53Z</dc:date>
    <item>
      <title>build marketing email via api. - Table with tokens (fields)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/799881#M64417</link>
      <description>&lt;P&gt;is it possible to build a marketing email via API with a table and fields.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 28 May 2023 08:38:34 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/799881#M64417</guid>
      <dc:creator>karien</dc:creator>
      <dc:date>2023-05-28T08:38:34Z</dc:date>
    </item>
    <item>
      <title>Re: build marketing email via api. - Table with tokens (fields)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/800316#M64439</link>
      <description>&lt;P&gt;Hey,&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/381889"&gt;@karien&lt;/a&gt;&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt; The &lt;A href="https://legacydocs.hubspot.com/docs/methods/cms_email/create-a-new-marketing-email?_ga=2.112043908.1826773620.1685403989-1772929569.1685403989&amp;amp;_gl=1*i3gdv9*_ga*MTc3MjkyOTU2OS4xNjg1NDAzOTg5*_ga_LXTM6CQ0XK*MTY4NTQwMzk4Ny4xLjAuMTY4NTQwMzk4Ny42MC4wLjA." target="_blank" rel="noopener"&gt;Marketing Email endpoint&lt;/A&gt;&amp;nbsp;can set the content of a marketing email but not create complex element like tables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You'll need to create your custom modules and tables and save them as a &lt;A href="https://knowledge.hubspot.com/design-manager/create-page-email-and-blog-templates-in-the-layout-editor#create-a-new-template" target="_blank" rel="noopener"&gt;custom email template&lt;/A&gt; to be used with emails you start via the API.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Have fun building! — Jaycee&lt;/P&gt;</description>
      <pubDate>Mon, 29 May 2023 23:49:20 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/800316#M64439</guid>
      <dc:creator>Jaycee_Lewis</dc:creator>
      <dc:date>2023-05-29T23:49:20Z</dc:date>
    </item>
    <item>
      <title>Re: build marketing email via api. - Table with tokens (fields)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/802265#M64565</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/381889"&gt;@karien&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, it is possible to build a marketing email via API with a table and fields. Here are the steps involved:&lt;/P&gt;
&lt;P&gt;1. **Create a new marketing email.** To do this, you will need to make a POST request to the `/marketing/v1/emails` endpoint. The request body must be a JSON-formatted object with the following properties:&lt;BR /&gt;* `name`: The name of the marketing email.&lt;BR /&gt;* `subject`: The subject line of the marketing email.&lt;BR /&gt;* `content`: The content of the marketing email. This can be a plain text or HTML string.&lt;BR /&gt;* `template`: The ID of a marketing email template that you want to use. If you do not specify a template, the marketing email will be sent as plain text.&lt;/P&gt;
&lt;P&gt;2. **Add a table to the marketing email.** To do this, you will need to make a POST request to the `/marketing/v1/emails/tables` endpoint. The request body must be a JSON-formatted object with the following properties:&lt;BR /&gt;* `name`: The name of the table.&lt;BR /&gt;* `columns`: An array of objects that define the columns in the table. Each object must have the following properties:&lt;BR /&gt;* `name`: The name of the column.&lt;BR /&gt;* `type`: The type of the column. Valid values are `text`, `number`, `date`, and `time`.&lt;BR /&gt;* `isRequired`: Whether or not the column is required.&lt;/P&gt;
&lt;P&gt;3. **Add fields to the table.** To do this, you will need to make a POST request to the `/marketing/v1/emails/tables/fields` endpoint. The request body must be a JSON-formatted object with the following properties:&lt;BR /&gt;* `name`: The name of the field.&lt;BR /&gt;* `column`: The ID of the column that the field belongs to.&lt;BR /&gt;* `value`: The value of the field.&lt;/P&gt;
&lt;P&gt;4. **Send the marketing email.** To do this, you will need to make a POST request to the `/marketing/v1/emails/send` endpoint. The request body must be a JSON-formatted object with the following properties:&lt;BR /&gt;* `email`: The email address of the recipient.&lt;BR /&gt;* `table`: The ID of the table that contains the data for the marketing email.&lt;/P&gt;
&lt;P&gt;Here is an example of a JSON request body that you can use to build a marketing email with a table and fields:&lt;/P&gt;
&lt;P&gt;```&lt;BR /&gt;{&lt;BR /&gt;"name": "My first marketing email",&lt;BR /&gt;"subject": "Welcome!",&lt;BR /&gt;"content": "&amp;lt;p&amp;gt;Welcome to our company!&amp;lt;/p&amp;gt;&amp;lt;p&amp;gt;Here is a table of some of our products:&amp;lt;/p&amp;gt;",&lt;BR /&gt;"template": null,&lt;BR /&gt;"tables": [&lt;BR /&gt;{&lt;BR /&gt;"name": "Products",&lt;BR /&gt;"columns": [&lt;BR /&gt;{&lt;BR /&gt;"name": "Product Name",&lt;BR /&gt;"type": "text",&lt;BR /&gt;"isRequired": true&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Price",&lt;BR /&gt;"type": "number",&lt;BR /&gt;"isRequired": true&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Quantity",&lt;BR /&gt;"type": "number",&lt;BR /&gt;"isRequired": false&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;],&lt;BR /&gt;"fields": [&lt;BR /&gt;{&lt;BR /&gt;"name": "Product Name",&lt;BR /&gt;"column": 1,&lt;BR /&gt;"value": "Product 1"&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Price",&lt;BR /&gt;"column": 2,&lt;BR /&gt;"value": 100&lt;BR /&gt;},&lt;BR /&gt;{&lt;BR /&gt;"name": "Quantity",&lt;BR /&gt;"column": 3,&lt;BR /&gt;"value": 1&lt;BR /&gt;}&lt;BR /&gt;]&lt;BR /&gt;}&lt;BR /&gt;```&lt;/P&gt;
&lt;P&gt;This request will create a marketing email with a table that contains two columns: Product Name and Price. The email will be sent to the specified email address and will include the data for the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this will helps you out. Please mark it as Solution Accepted to help other Community member.&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 13:24:19 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/802265#M64565</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2023-06-02T13:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: build marketing email via api. - Table with tokens (fields)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/803375#M64632</link>
      <description>&lt;P&gt;Thank you Gaurav, for taking the time to give me all this info. Really appreciate it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 08:39:23 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/803375#M64632</guid>
      <dc:creator>karien</dc:creator>
      <dc:date>2023-06-06T08:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: build marketing email via api. - Table with tokens (fields)</title>
      <link>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/803387#M64633</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.hubspot.com/t5/user/viewprofilepage/user-id/381889"&gt;@karien&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please mark it as Solution Accepted and upvote to help other Community member.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Jun 2023 11:19:53 GMT</pubDate>
      <guid>https://community.hubspot.com/t5/APIs-Integrations/build-marketing-email-via-api-Table-with-tokens-fields/m-p/803387#M64633</guid>
      <dc:creator>GRajput</dc:creator>
      <dc:date>2023-06-06T11:19:53Z</dc:date>
    </item>
  </channel>
</rss>

