How to add specific code to "order confirmation" -notification template

Hi,

I sell physical and digital products on my Shopify store. I have used Active Campaign for delivering the digital product’s content to the customer (YouTube links).

I have faced a few problems with Active Campaign automation AND I’m planning to send digital product’s content with Shopify “order confirmation” notification.

Question: How can I add the code “if” -code. For example, I have two digital products:

Product A’s SKU: Product-A

Product B’s SKU: Product-B

I want that when customers buy my Product A → the Shopify order confirmation sends to the right content to my customer’s email.

So, the code is something like “if the product SKU is Product-A → send this” AND “if the product SKU is Product-B → send this”

If you can help me it would be great!

From your Admin - Settings - Notifications - Order Confirmation. Find these line of code {% if line.variant.title != ‘Default Title’ %}

Below that line, you can put on the condition to check product by SKU

{% if line.variant.sku == 'Product-A' %}
       // put your Youtube link here
 {% endif %}
{% if line.variant.sku == 'Product-B' %}
      // put your Youtube link here
{% endif %}

The result should be like this. You can edit a little bit so it looks familiar with customer.