“I’d like to give users the possibility to manage their own emails that’ll be sent by a Power Automate flow, can I do it without sharing the flow?”
Every Power Automate flow that you build has some fixed parts. The trigger is connected to a fixed location, many of the actions are using fixed locations, emails have a fixed text… But in some situations building a fixed flow can make it very complicated – that’s why you should use configuration lists. Not only will configuration lists make your flow simpler, but they’ll also allow users to modify the flow behaviour.
You can have a configuration list to simplify approval flows, or you can have a configuration list with emails. And that’s the topic of this post – how do you allow users to edit emails content without accessing the flow?
Create configuration list with the emails
As already mentioned, you’ll need a SharePoint configuration list with at least 3 columns – the email unique identifier (Title), email subject (Single line of text), and email text (Multiple lines of text with rich text enabled).
The main trick is that the rich text fields use the same HTML format as emails do. You can define the full email including formatting in the field and then use it as the email body.
Once you have the configuration list do a lookup in your flow and send the email.
Add some placeholders
But there’s one more step to take. If you used just the defined email text, you’d lose one of the most valuable functionalities – using dynamic contents in the emails. Since the email can contain some dynamic parts, you might need a few placeholders.
Placeholder is a fixed string that’ll mark a location for a dynamic content. I prefer defining placeholders with ##, e.g. ##Name## to mark the location of the name.
The placeholders must be a fixed list! Users can’t create their own placeholders as every placeholder must be handled in the flow with the replace(…) expression.
Instead of using the email text directly, replace all the placeholders with dynamic contents, e.g.
replace(items('Apply_to_each')?['EmailText'],'##Name##', outputs('Compose'))
After the expressions replace all the placeholders, it’ll send the customised email with the correct values.
Summary
Configuration lists are one of the most powerful concepts when you build a flow. Not only can they make your Power Automate flow simpler, you can use them to allow users to change part of the flow without touching the flow, e.g. to manage emails wording. Use the multiple lines of text column with enabled rich text editor, define a few placeholders, and let users to manage the emails by themselves.