cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Prav
Helper III
Helper III

Create Array from Search for user

Hello,

Within an apply to each I'm parsing the approver's names (Get Items from SP) to Search for users to get the email address "Mail": "me@microsoft.com").

Then my next step is to create union array but i'm getting the error message below.

 

InvalidTemplate. Unable to process template language expressions in action 'UnionApprovers' inputs at line '1' and column '2655': 'The template language expression 'union(variables('Approvers'),createArray(body('Search_for_Users')?['Mail']))' cannot be evaluated because property 'Mail' cannot be selected. Array elements can only be selected using an integer index. 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Instead of using the name, I've saved the email addresses to SP and parse to Flow. 

Working now.

View solution in original post

7 REPLIES 7
RezaDorrani
Dual Super User
Dual Super User

Hi @Prav 

 

post screenshot of flow and the error

flow error.PNG

Hi @Prav 

 

GetEmail which action is that in Office 365 users?

 

Apply to each loop - what is being looped?

 

 

 

 

@RezaDorrani 

Yes, Office 365.

@body('GetClaims')?['value'] loops through Get Items from SP

Hi @Prav 

 

Yes, Office 365 - But which action are you using from the Office 365 connector?

 

@body('GetClaims')?['value'] loops through Get Items from SP - share screenshot of entire flow

I'm using 

 

searchforusers.PNGflow error2.PNG

Instead of using the name, I've saved the email addresses to SP and parse to Flow. 

Working now.

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (1,645)