I am evaluating a dynamic email system that can render email html based on some templateId + data from another backend. While playing around with Foundations for Email, so far the only way I have seen this work in the wild is by creating a .json file under src/data folder using the data from the backend request, and then generating the html output. Is this the only way to generate dynamic emails?
This is what I envision the workflow to be:
- A backend sends templateId + data as request
- The email microservice picks the correct template based on the template Id.
- Passes on the data to this template
- Render the html output at runtime and return a response.
Do you guys have any examples of making this work using Foundation for Emails?