Hello,
I have a question regarding Sending emails flows.
I have a MS Form and one of the questions is Country. IF Country is included in a list (45 countries there) then the email needs to be send to: managers@XXX.com; amanda.Garcia@XXX.com; John.schulster@XXX.com and if country is not in that list, then to amanda.Garcia@XXX.com; John.schulster@XXX.com
Tried the "switch" option "send email" for every country but I get the error "to many cases"
Flow save failed with code 'AllowedSwitchCaseLimitExceeded' and message 'The template action 'Switch' at line '1' and column '1920' is not valid: the number of cases used '45' exceeds the maximum number allowed '25'.'.
Any other option to get this result?
thanks
Tied also this approach but same results...something is off
Hi Scott
sorry to bother you- Not very fluent in the Power automate yet.
Tried again. When I save it seems ok but...
Currently my flow looks like:
where Compose:
Where Compose1: Just the Function? No need to add anything else?
or Do I need to specify the Output from prev Compose?
How DO i link the Compose and Compose 1 to my form? To a "Get response Details"?
and the Condition:
thanks,
You could use a switch or a condition.
If you use a condition, the condition would be If Compose 2 is equal to -1
If yes - this means country not found
If no, the means country is found.
Th error is with you send an email action. Can you post a screen shot?
Hello Scott and thanks for your quick reply,
I followed your steps. I assume that after the second "compose" I need to use the switch + Send email option?
If Case = -1 send email to.... and Default email to....?
When I select the "switch" option I need to provide a parameter "on".... should be Compose 1?
I get the below error:
The input parameter(s) of action 'Send_an_email_(V2)' contain an invalid reference to 'Get_response_details'. Correct to include a valid reference to 'Get_response_details' for the input parameter(s) of action 'Send_an_email_(V2)'.
Thanks
Rob
You could simple add a second switch action, but that would be a very bad idea.....
I suggest rewriting your Flow and removing the switch action.
There are a number of ways of approaching this - here is a simple way.
Add a Compose action
Populate the Compose action with a delimited list of all countries
Use a lastIndexOf() action to see if the country is listed in the Compose action.
If it isn't found, the expression will return -1
If any number other than -1 is returned, the country is in the list
See my example below. I hard coded a country - you will reference Dynamic properties
Please let me know if you need more help.
Michael E. Gernaey
497
Super User 2025 Season 1
David_MA
436
Super User 2025 Season 1
Riyaz_riz11
244
Super User 2025 Season 1