I'm on Enterprise 11.3 and I'm trying to send email notifications when a record is created in a layer that is hosted. It is a hosted feature with 3 layers of Electric, Gas, Water. I want the email to go to a different person depending on which layer the record is created in.
Initially I had 3 individual flows set up for Electric, Gas, and Water and only had Hosted Feature/Electric selected in the Electric and so on...it would still send the emails out to all 3 of them. So I tried to combine them into one flow with conditions. I got it where it will go, but only go for the left condition. If the Right condition is met the flow says it succeeds but never sends the email. When I test the flow and click the apply to each on them to see the results they are grayed out for those when the right condition is tested.
Not sure what I'm doing wrong.
Hi,
I keep rewriting this as it seems like it should be very easy to figure out.
First question though, why are there 2 Apply to Each in the same row (same time). I haven't seen a situation like that and might be making it more complicated. In fact would love to know if the email sends for GMTR without any other steps. Can you remove the LV and see if just the one apply to each works for a new record with asset GMTR. It should probably just be mimicking your original flow.
If it works, then it is definitely the setup. I was going to suggest a Switch statement instead of Condition but think that only works on Equal, not Starts With that you are using.
So if one Condition works to get you the GMTR successfully, you can use the No side of the GMTR condition to add a Condition for LV and you can chain it forward like that if you have more values. Not super efficient if you have a lot, but if your don't have defined values to match (just starting letters), I don't think you can use Switch.
See attached for a diagram of this. Let me know how that goes.
-Tim
For the 2 Apply to Each question. I didn't add them, as soon as I added the parallel condition statement it automatically add the 2 Apply to Each. Why they need to be there or why it added them I don't know.
I did some testing last week and If I make 3 separate workflows with one condition in them each for the services than it works. But it really seems silly to have 3 separate workflows against the same service.
I will give your suggestion a try, never thought to put another condition in the NO part.
Hi @LindseyStone, I am with @TimLohnes1 here you don't need 2 apply to each loops.
The reason why it adds the loop after `Fetch Updates, changes.... ` action is because there can be more than one change and output of the Fetch action is an array of features. So for each feature you are running the operation.
I didn't understand the first part of your request where you wan to check if the record is updated in a specific layer.
It is a hosted feature with 3 layers of Electric, Gas, Water. I want the email to go to a different person depending on which layer the record is created in.
Power Automate can add one trigger for each flow so I am thinking that you will still need 3 flows.