Trying to create a process flow that sends template emails for different stages of a process.
User selects a list item and run a selected item flow. Selects the process stage from SharePoint for a selected item input. Then the flow takes the list item data and uses it to process various pieces of logic and spit out the appropriate email based on the data.
Each of the emails content are currently hard coded. I need to avoid the maintenance on each of the emails steps and there are more than 30 of them. I need to allow the business users to update the email templates through a multi-line text field in a separate list and provide them with the place holder information for each of the fields. So they can adjust all their wording and templates.
There is a video out there from Krishna Vandanapu which gave me the idea, his is based on Powerapps and only shows one field replacement.
What I am having trouble with is in Powerautomate creating the required array and apply to each loop to look at each of the fields pulled from the SharePoint list. Then find the place holders in the Email template html from a variable and replace the place holders for each list item in the variable html. Effectively doing a find and replace.
I gather it is probably an array like
[
{
Key: Country, Value: United Kingdom
},
{
Key: Component, Value: Part1
}
]
I have about 60 plus fields currently so don't want to have to hard code those in emails as is currently the case.
Any ideas or sugesstions or examples welcome
Thanks