Depending on how flexible the templates need to be, one pattern we use a lot are flows that define some abstract logic that is configured using something like JSON or SQL or something else depending on our needs.
As an example, we have monitors that need to run every day, they query our db, and post messages in various formats to Slack and files in Box. The flow itself doesn’t know anything about the monitors, it pulls a github repo where all our configurations exist and then executes them.
The monitor is defined in SQL with some metadata to configure the target Box folder, Slack channel and even message format.