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

Read Excel Row and Search for Email

I have an excel sheet in OneDrive that has users name in a column and I would like to build a flow that looks up each name automatically, gets their email addresses from the Office 365 connector and then sends each of those rows an email from a shared email box.

 

Is there a way to create this?  Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Dual Super User
Dual Super User

Re: Read Excel Row and Search for Email

Yes, we can!
Do you need to send a single email to all target users, or one independent email per user?
Also.... which event shall trigger your flow? Is it OK to execute it once a week or so?

And finally, which kind of user related data do you currently store in your Excel?

As you can see in the screenshot, if you store User Principal Name (UPN) you can get its email address by simply adding 'Get User Profile (v2)'. But if you just have the display name, surname or so, then you would probably need to use 'Search for users (v2)', which I believe can return more than one result.

 

Flow_getUserProfile.png
Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

9 REPLIES 9
Highlighted
Dual Super User
Dual Super User

Re: Read Excel Row and Search for Email

Yes, we can!
Do you need to send a single email to all target users, or one independent email per user?
Also.... which event shall trigger your flow? Is it OK to execute it once a week or so?

And finally, which kind of user related data do you currently store in your Excel?

As you can see in the screenshot, if you store User Principal Name (UPN) you can get its email address by simply adding 'Get User Profile (v2)'. But if you just have the display name, surname or so, then you would probably need to use 'Search for users (v2)', which I believe can return more than one result.

 

Flow_getUserProfile.png
Hope this helps



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



View solution in original post

Highlighted
Helper I
Helper I

Re: Read Excel Row and Search for Email

@efialttes 

 

Thank you for your help.

 

So I would like to match the Emp# which is designated as "Nickname" in Outlook and then send each row and email.  This is what I have setup so far - my first test accidentally sent the test email to the whole company.  Any additional help will be much appreciated.

 

2020-02-13_11-51-21.jpg

Highlighted
Super User
Super User

Re: Read Excel Row and Search for Email

You don't need the Search for users because you've already brought back the user details from the Get user profile action. You can select the nickname from the Get  user profile in the dynamic content.

Rob
Los Gallardos

Highlighted
Helper I
Helper I

Re: Read Excel Row and Search for Email

Thanks @RobElliott 

 

Please let me know if you think this will work - I'm nervous to test again for fear of sending a test email to thousands of employees again.  Under "Apply to each 2" I used "Current item" instead of "value" from the list rows

 

2020-02-13_12-51-51.jpg

Highlighted
Dual Super User
Dual Super User

Re: Read Excel Row and Search for Email

Mmmmmm..... is 'Get user profile (v2)' working once you added #Emp as its input? Did you inspect the flow execution?
If so, as Rob says, user's email is one of its outputs
Hope this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Helper I
Helper I

Re: Read Excel Row and Search for Email

Thanks @efialttes - my flow did not work once I ran it.  The error I received under "Get user profile (v2)" was "Resource Not Found".  In regards to Dynamic Content, I'm only able to see the columns from my table when I click the "User (UPN)" box.  My apologies for the back and forth, I am a newbie with this.

 

Screen Shot 2020-02-13 at 9.06.15 PM.png 

Highlighted
Dual Super User
Dual Super User

Re: Read Excel Row and Search for Email

Hi
Replace 'Get user profile', use instead 'Search for users' and use #Emp as its input.
Reexecute the flow and verify if your target user is shown as an 'Search for users' output
Hope this helps


Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Highlighted
Microsoft
Microsoft

Re: Read Excel Row and Search for Email

Hello @bsmith736464 ,

 

Could you please tell us if you manage to make the flow run as expected? If not please let us know where you are still bloced so we can all try to help you out.

Highlighted
Dual Super User
Dual Super User

Re: Read Excel Row and Search for Email

@bsmith736464 

Did you finally solve the issue?

Thanx!



Each time you click on any of our inspiring answers 'Thumb up' icon...
...an ewok scapes from the stormtroopers.

Be grateful, Thumbs up! Save the Galaxy for free!


Escribo sobre Power Automate en:
https://medium.com/anyone-can-automate/

Proud to be a Flownaut!



Helpful resources

Announcements
firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,019)