I am new to Power Automate/Flow. I trying to get a list of users for my company into a excel file. I see a lot of other accounts in office users, so I just trying to filter unwanted users by email. I am having problem with filtering.
1. I don't see a way I can filter on a partial email like gmail.com. I am assuming it can't be done in the connecter itself
2. Next, I tried a conditional loop, I can't get the condition to work. What I am missing?
Hello @jbungay ,
you're right, you can't filter directly in the 'Search for users' action.
If you want to filter, you can use either the 'Condition' as you do, or you can use 'Filter Query' action that will take the array with all the users and return an array only with users who fit the condition. But in both cases you want to use 'Email' dynamic content and not 'body'. 'body' is an object that contains all the available information for each user, name, surname, email..., you want to use only the 'Email' in the condition.
Thanks for the response. I had email there originally and that doesn't work either. I get the following error. Unable to process template language expressions for action 'Condition' at line '1' and column '16231': 'The template language function 'ends With' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#endswith for usage details.'.
Thanks for your help, I figure it. Once I knew I was on the right track. The problem was one of the users had a new email and had to add a second condition to check for null
Check out how to claim yours today!
Check out new user group experience and if you are a leader please create your group
Test your skills now with the Cloud Skill Challenge.