I am trying to use automate to build a email recipient list based on a series of questions that have been answered earlier.
There are three different questions to ask about who to send to - auditor, regional manager & external contractor (with a field to fill provide an email address for the last one). Each are stand alone questions (so it could got to external contractor not the auditor etc) meaning that by the time there are 5 regions we have 35 different options of email recipient lists.
What I am wondering is there a way to do this without building a really wide flow with 35 different parts to it? What I am imagining is starting with beginning a list at the start and if they say to send to auditor, it adds person x, if they say regional manager it adds the person for that region previously selected etc.
Is this possible? Or are a whole heap of controls the best option?
as far as I tested, there is no "non-coded" solution to add forms choice lists items dynamically
better solution is to use forms branch behaviour
when selecting answer A from Q1 -> Q2
when selecting answer B from Q1 -> Q3
when selecting answer C from Q1 -> Q4
Where are these email recipient stores? And what's the structure of the list?
If possible, could you give us an instance? (please shield personal information)
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Currently the emails are from three different areas.
Question 1 - Do you require an email notification to be sent to yourself? If yes - sources email from auditor user ID built into the survey as a earlier initialized variable
Question 2 - Do you require email to be sent to the the regional Roading Manager? We have 5 possible regional roading managers. Region is already provided in the survey based on the details provided earlier. Hoping to get these into a list (when there is only 5 it makes it a bit easier) so that if Northland is selected, email goes to email@example.com, if its Bay of Plenty, then firstname.lastname@example.org etc
Question 3 - do you require email to be sent an external contractor? If so Please provide email in the following question. This then has the email to send to.
Currently I have set it up as follows -
Condition - do you want to send am email to yourself?
> If yes then uses user email variable and sends one email
Condition - do you want to send email to contractor?
> If yes then uses provided email to send email to contractor
Condition - do you want to send email to regional roading manager?
>If yes then switch for region with 5 different options
And while this works it doesn't feel that clean and is sending three separate emails rather than all as one which is the ideal.
solution could be to initialize an empty variable "MailRecipient" that you populate after each condition
IF Q1 = YES then
Add to text variable "email@example.com,"
IF Q2 = YES then
Add to text variable "firstname.lastname@example.org,"
IF Q3=YES then
Add to text variable "email@example.com"
Then you end up with a text variable that may contains firstname.lastname@example.org, email@example.com, firstname.lastname@example.org if you answered yes
Then you can use this variable as mail recipient in the only mail steps in your workflow
N.B. : When I see you first questions, it makes me believe this email@example.com should not be in Recipient (TO) but as copy (CC)
Check out new user group experience and if you are a leader please create your group
See the latest Power Automate innovations, updates, and demos from the Microsoft Business Applications Launch Event.
Many congratulations to the Season 1 2021 Flownaut Crew!
ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.