Accessing metafield reference in notification emails?

Hello everyone!

In notification emails, it’s possible to access product metafields. However, when using a metafield that is a reference to a metaobject entry, we can’t access the actual value of that entry.

If the metafield was a string/boolean, using item.product.metafields.namespace.key would return that value, but if that metafield holds a metaobject entry, using item.product.metafields.namespace.key return the gid of that metaobject entry, not the actual drop (object).

  • Using something like this {{ line.product.metafields.custom.product_categories }} would return gid://shopify/Metaobject/135303448123 as text.
  • Using {{ line.product.metafields.custom.product_categories.value }} returns nothing

Is this a known limitation? Are there any workarounds for this (without using apps)?

Thank you!