How can I customize order confirmation emails based on purchase?

Hi, I’m trying to figure out if there is a where where I can set up Shopify order confirmation emails to be customized based on what the customer buys. For example, I have 4 sample sets available for purchase on my website. When a customer purchases one of those sample sets, I want to use a unique discount code to offer a discount (which I know how to do). The issue I am having is that I want the customers order confirmation email to include that discount, but please note this can’t be a