Of course, we can use a brute force way to replacing column names with their respective values but it’s not a scalable approach.
Allowing template source file to become a calculation could be a possible solution. Let the end user deal with invalid expressions as well as the author’s accessibility to those files.
Another possibility is having a function similar to eval in a Javascript with a build in security such as not printing hidden columns.
Currently, the app author has to involve in authoring templates for emails and reports. When the use case require frequent changes on wording and format of the reports/emails, it becomes impractical.