Marketing dept at my company wants our system to send out an "order confirmation" email listing the products that were purchased as well as transaction details (coupon values applied, taxes, subtotals, totals, etc). Some transaction details will only be displayed in some emails where applicable.
Currently the system generates the content (HTML) of the email and it is just sent via SendGrid's SMTP (without using their templating system). Marketing wants to take control of the content via Hubspot and just have the system supply the data for the products and have Hubspot generate the content for the email so that Marketing can manipulate the look of the email without needing IT. This means that the template/email that Marketing creates need to support "looping" (to be able to get information about each product and generate the content for the product) as well as being able to hide content based on certain conditions.
How can this be accomplished in Hubspot email templates?