cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Flow fails when SharePoint list item updated to allow multiple email addresses in People Picker

I had a SharePoint form that had four People Picker fields that were all used to send status and update reminders to all names entered therein. All of this was established and working well for a long time, but then it was requested I update the People Picker fields to allow multiple names because the list item responsibilities sometimes bridge multiple shifts.

 

I did this and it worked fine in the list, no issues, but now suddenly my reminder Flow is failing with this error:

 

InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_from_a_shared_mailbox_3' inputs at line '1' and column '2635': 'The template language expression 'triggerBody()?['Engineer_1']?['Email']' cannot be evaluated because property 'Email' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

 

Note that Engineer_1 is the field that (now) has two names/addresses in it.

 

I am a Flow newbie, so my questions are A.) can a flow extract multiple email addresses from a list item and add them both to the "To" of "CC" address? And B.) What is different vs. using a single email that I am clearly missing here?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Flow fails when SharePoint list item updated to allow multiple email addresses in People Picker

 

Hi @Daryl_K ,

 

Please try this, use variables to store all emails in the person field and configure variables to Send an email action:

122.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
Highlighted
Super User
Super User

Re: Flow fails when SharePoint list item updated to allow multiple email addresses in People Picker

If the email is a Shared Email Box,  then who ever triggers the flow must be a member of the shared email box

 

I found this a big issue with powerapps as it a the user of the app that triggers the flow.  I had emails embeded in teh flow that were from a Shared MailBox.  They failed because of this issue.  Never failed in testing as I was the user and I had access to the mailbox

 

 

Highlighted
Super User II
Super User II

Re: Flow fails when SharePoint list item updated to allow multiple email addresses in People Picker

The reason your flow is failing is because the original flow a people field was returning 1 value, now it can return many.

 

Remove the people field from the send an email action and re-add it, it will automatically add an apply to each for you.

Highlighted
Community Support
Community Support

Re: Flow fails when SharePoint list item updated to allow multiple email addresses in People Picker

 

Hi @Daryl_K ,

 

Please try this, use variables to store all emails in the person field and configure variables to Send an email action:

122.PNG

 

Best Regards,

Community Support Team _ Barry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Helper II
Helper II

Re: Flow fails when SharePoint list item updated to allow multiple email addresses in People Picker

Well, this seemed close to the fix. Not sure if I did something wrong, but the FLow does have several branches, so I did exactly as you describe to all three fields that could possibly contain more than one email address in the "main" trunk of the Flow, including the Apply to Each and Append actions, then used the "_Email" variant of each in my "To" field, but now I am getting this error message:

 

InvalidTemplate. Unable to process template language expressions in action 'Send_an_email_from_a_shared_mailbox_3' inputs at line '1' and column '2632': 'The template language expression 'triggerBody()?['Assigned_to']?['Email']' cannot be evaluated because property 'Email' cannot be selected. Array elements can only be selected using an integer index. Please see https://aka.ms/logicexpressions for usage details.'.

 

Being quite new to FLows I am uncertain what is meant by "Array elements can only be selected using an integer index."

Highlighted
Helper II
Helper II

Re: Flow fails when SharePoint list item updated to allow multiple email addresses in People Picker


@v-bacao-msft wrote:

 

Hi @Daryl_K ,

 

Please try this, use variables to store all emails in the person field and configure variables to Send an email action:

122.PNG

 

Best Regards,


Thank you! I turns out yours was the solution! I had some formatting errors, and I actually had a much larger number of people picker fields than I had shown, but once I worked out my goofs (and you MUST incldue the semicolon shown in your example) it worked fine.

 

The bigger challenge was that I actually had two flows on this list, with the second one doing a scheduled scan and sending emails based on inactivity and the like. That one was fun becuase my test runs were including dozens of people on the emails, until I figured out that the variables were "stacking" email addresses in-between lists entries. That was when I had the idea of one more string variable called "null" and created as empty, then at the end of each "Apply to All" I set all of the email variables equal to null variable, and that fixed that!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (7,446)