Select a List and send it SendGrid via API Connector as a Table

I want to send a customer a summary of the data they shared with us when making an offer. The data includes data from a thing called cartItems and it is all of the items in the shopping cart the customer is requesting.

I want to extract them using an API Workflow and then pass them to SendGrid where the email template is waiting.

The trouble is that Sendgrid cannot dynamically construct a table, so I have to send the dat to API Connector as a table

"cartItems.productName"cartItems.productSKUcartItems.productPricecartItems.productQunatity

I am passing cartItems from the Schedule API Workflow to the backend workflow as a list of texts by formating the list of cartItems as text and adding the delimiter (,).

Is there a way to add the html tags into data being sent. I can see format as text will split the list into rows on a comma, but not sure how to wrap the rows in or the data in

Has anyone sent a table to SendGrid via the API Connector?

This is the JSON being sent, this is the table in SendGRID. It appears the " embedded in the SendGrid template as {{cartItems.cartProudctsList}} is being inserted into the HTML with quotes around the tag preventing the HTML tags from parsing the table.

{
  "from": {
    "email": "iwstemail",
    "name": "I Want That!"
  },
  "personalizations": [
    {
      "to": [
        {
          "email": "<consumerEmail>"
        }
      ],
      "dynamic_template_data": {
        "consumer": {
          "consumerName": "<consumerName>",
              
          "consumerFirstName": "<firstName>",
              
          "consumerEmail": "<consumerEmail>"
        },
        "offer": {
          "offerCreateDate": "<offerCreateDate>",
              
          "offerPrice": "<offerPrice>",
              
          "offerDiscountPrice": "<offerDiscountPrice>",
              
          "offerStatus": "<offerStatus>"
              
        },
        "counter" : {
              
          "counterOfferDate" : "<counterOfferDate>",
          
          "counterOfferPrice" : "<counterOfferPrice>",
           
          "counterOfferDiscountPrice" : "<counterOfferDiscountPrice>",
              
          "counterOfferExpiry" : "<counterOfferExpiry>",
              
           "counterOfferExpireDate" : "<counterOffeExpireDate>",
              
           "counterOfferURL" : "<counterOfferUrl>",
              
           "counterCartItems": "<counterItems>",
              
           "counterCartUnits" : "<counterUnits>"
        },
              
        "cart": {
          "cartTotalPrice": "<cartTotalPrice>",
              
          "cartURL": "<cartUrl>",
              
          "cartItemsCount": "<cartItemsCount>",
              
          "cartUnitsCount": "<cartUnitsCount>"
              
        },
         "cartItems" :{
         
           "cartProductsList" : "<cartProductsList>"
              
        },
       "store": {
          "storeBrand": "<storeBrand>"
        }
      }
    }
  ],
        "template_id": "<sg-template>"
}

This is the test data for the API COnnector

<tr>
  <td>Product A</td>
  <td>123</td>
  <td>456</td>
  <td>SKU123</td>
  <td>2</td>
  <td>$20.00</td>
</tr>
<tr>
  <td>Product B</td>
  <td>789</td>
  <td>101112</td>
  <td>SKU456</td>
  <td>1</td>
  <td>$15.00</td>
</tr>

Figured it out {{{cartItems.cartProductsList}}} - triple curly braces in SendGrid HTML template remove the quotes around the JSON html table body I am sending.

Spoke too soon…

I have a custom event and a parameter called cartItemstable

in the workflow sending the data to the parameter I am selecting a list of cartItems from the cartItems table, then using format as text to format the items (I think) into an HTML row. The delimiter is a space

What I am trying to get is a single text string that could have multiple hmtl table rows in them. But when I pass the value to the parameter and over to the API Connector, the server log shows nothing passed.

My objective is to send a list of cartItems and populate an HTML table in a SendGrid email so the body of the table must come to it as JSON in an HTML table format.

In the API Connector, I can paste an HTML table row and data and initialize and the data maps correctly in the SendGrid email I just cannot seem to get the data out of Bubble and formatted this way.

thoughts?