Email Notification Customization - Product Categories

I’m trying to add a bit of text to the Order Confirmation emails. I want it to operate like this:

IF > any of the products in the order belong to a specific category

THEN > add this text

I think it should be inserted above this in the default template. I’m not sure how to call to check the product category.

{% else %}
          We're getting your order ready to be shipped. We will notify you when it has been sent.
      {% endcase %}

I don’t think there is a way to retrieve the product category using Liquid. I checked the docs, and I couldn’t find anything :frowning: