You need to retrieve the email template from database, then set it as Argument. If you retrieve the email template by name, please note that the logic will break when the template’s name is changed.
Thanks Thorsten for your help. I’m one step closer thanks to you. Already a new error now but I’ll first try to figure out myself.
Is there any workaround for your note, if the template’s name is changed?
personally, I like to create an association between a configuration object and an emailtemplate. This way you’re sure that when the name of the template changes, it can still be retrieved.
Hey Roy, thanks!
At this moment I’ve a working flow for the email template but indeed, it would be better with an association. Still figuring this out!
To add onto possible solutions which might help you. I did the following:
When the user wants to send a mail, he clicks on a button that opens a page with all templates listed (in a listsview for example), which looks like this:
Then the user can pick a template, with the green check symbol button. This button calls the sendMail microflow and passes the template as a EmailTemplate object to the microflow. The EmailTemplate parameter should then be the template you chose. You don’t need to retrieve the template by name then.
I think this is a fairly elegant way to make the send mail action flexible, as you don’t have to retrieve the template by name now.
I hope my answer could help you a bit or any other user reading this.