I have a flow that will run on the first of each month, get the month and then filter a sharepoint list based on that month. This part works with no issue. Next, I need to get both the Lead and CoLead email(s) from each record that is extracted. I am trying to append the email to the array but find it difficult to get the proper syntax to get that email. I am trying item()?['Lead]]?['Email'] but I get an error. I also need to not only get the Lead email, but the CoLead email, and then do a DISTINCT, so they are not duplicated.
I get this - 'item()?['Lead']?['Email']' cannot be evaluated because property 'Email' cannot be selected. Array elements can only be selected using an integer index.
I appreciate any help and direction for this.