It sounds like you need something to re-generate the value of the htmlBody variable after the values are generated for the embedded variables. Just guessing, but the embedded values are probably null when first sent to the script, and you are not specifically updating the body when they are no longer null.
------------------------------
George Ganahl GCCX-AI, GCP, GCSME, ICCE, ICHD, etc.
Technical Adoption Champion
Genesys
2024 Community Member of the Year
------------------------------