How to setup a condition within an email template

Your software
My Mautic version is: 4.4.10
My PHP version is: 8.0.30
My Database type and version is: MySQL 5.7.35-38

Your problem
Hey!

I’d like to setup a very simple conditon based email template, which would have the same opening and closing text, but a part of the main body would differ based on if the custom field “is_primary” is 0 or 1.

How can I do that?

What if you create tow segments and two emails, then send two emails each with different body to a different segment?