cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

send email by user name in Excel file

Hi Team,

Is it possible in microsoft flow to send email by excel column (only project manager name not email address),because our manager dont want to add email address manually in excel file.

Status         Project      Item      Type      Start Date            End date              project manager      
Pending       SwS          Java                    15/05/2018           15/08/2018               Dominique philippi
Pending       SI              Python                 08/05/2018           17/08/2018               Arnaud ferrand
Pending       GSS          Ruby                    06/05/2018           05/08/2018               Janice Lagundi

Please reply me.

Regards
Vikas kaushik

1 ACCEPTED SOLUTION

Accepted Solutions
vecerpa
Memorable Member
Memorable Member

Hi @Anonymous,

 

It is possible to search for user via function in Office 365 Users connector.

 

I was playing with it and it seems like you have to search just for surname of user that is filled in project manager columnt of table as the whole name will not deliver result in my case. This is caused by that we have in display name specific format, not just a name.

 

The whole function to get UPN and email of user by name can look like this:

 

ExcelMail.png

 

Expression in search is just splitting the Name of project manager from excel that I previously stored in variable Surname:

 

last(split(variables('Surname'),' '))

After searhc user action you can use email notification with email that was found by User Search.

Hope this helped you

 

P.

 

View solution in original post

25 REPLIES 25
vecerpa
Memorable Member
Memorable Member

Hi @Anonymous,

 

It is possible to search for user via function in Office 365 Users connector.

 

I was playing with it and it seems like you have to search just for surname of user that is filled in project manager columnt of table as the whole name will not deliver result in my case. This is caused by that we have in display name specific format, not just a name.

 

The whole function to get UPN and email of user by name can look like this:

 

ExcelMail.png

 

Expression in search is just splitting the Name of project manager from excel that I previously stored in variable Surname:

 

last(split(variables('Surname'),' '))

After searhc user action you can use email notification with email that was found by User Search.

Hope this helped you

 

P.

 

Anonymous
Not applicable

Hi vecerpa,

Thanks for your reply..
please check below concerns regarding this....

1. this file comes everyweek in excel format......

2. Need to create event reminder flow between start date and End date,

3. inside excel only PM full name is available (no provision for first name and surname).

4. Team dont want to add PM email address manually everweek in excel file (on onedrive for business).

5. is it possible to create 50 users email id in other location like one drive for business (in excel file) then fetch user email id from there to run the flow....because this flow is only for our team.....in office 365 user group there might be possiblity for dulication of surname .........and also surname is not available in the excel file......

6. everything is ok but not able to solve this issue.....(how to send email with PM name only) without email address in excel file.

Please reply....because its a urgent task.

Anonymous
Not applicable

Hi @vecerpa,

Thanks for your reply..
please check below concerns regarding this....

1. this file comes everyweek in excel format......

2. Need to create event reminder flow between start date and End date,

3. inside excel only PM full name is available (no provision for first name and surname).

4. Team dont want to add PM email address manually everweek in excel file (on onedrive for business).

5. is it possible to create 50 users email id in other location like one drive for business (in excel file) then fetch user email id from there to run the flow....because this flow is only for our team.....in office 365 user group there might be possiblity for dulication of surname .........and also surname is not available in the excel file......

6. everything is ok but not able to solve this issue.....(how to send email with PM name only) without email address in excel file.

Please reply....because its a urgent task.

Hi @Anonymous,

 

1. this file comes everyweek in excel format......

Better to use one shared file that is stored in OneDrive for Business or inside SharePoint document library as for now it is possible to load data from groups (Sharepoint team site document library) or sites (SharePoint site document library). Define specific excel file where each editor have access to. No need to have multiple files... etc....

2. Need to create event reminder flow between start date and End date,

There is no problem to create Flow that will be scheduled to trigger at specific time and compare actual date (utcnow expression) against start date and end date.

3. inside excel only PM full name is available (no provision for first name and surname).

Ok, so that is reason why I used split and last expressions to get for example last name. If there is First Name + Last Name format of Project Manager name that is stored in excel file column.


4. Team dont want to add PM email address manually everweek in excel file (on onedrive for business).

If those users (Project Managers) are internall one then there is no problem to look for valid email that is configured for such user via Office 365 Users connector.

5. is it possible to create 50 users email id in other location like one drive for business (in excel file) then fetch user email id from there to run the flow....because this flow is only for our team.....in office 365 user group there might be possiblity for dulication of surname .........and also surname is not available in the excel file......

Yes it is possible, but again as I write in previous point if those users are in your Office 365 tenant with assigned email addresses the excel file you want to create is useless, such information is stored with your user account - in Office 365.

P.

Anonymous
Not applicable

Hi @vecerpa

Thanks for your help and reply....
yes all the users is in office 365.....
can you please share me more details and screenshot, how can i achieve this target....

for example any PM name which email ID on office 365 exists (only name in excel file),how can i send the email to that Project manager, please consider full name not first name or surname.
can you please share further steps in screenshot (only for one or two PM).

Thanks in advance....

Anonymous
Not applicable

Hi @vecerpa
Please reply if no first name or last name provision in excel file and with same name other user is also available in office 365 tenant,
so how can flow get exact user email address for our team,

please share some steps or screenshot....

Regards
Vikas Kaushik

Hi @Anonymous,

 

So the whole Flow can look like this:

 

1. I use manual button trigger just for test purposes, you should change it to something like schedule or whatever you want to trigger your Flow.

 

2. As input i choosed Excel Online Business connector it can load excel files not only from OneDrive for Business but also SharePoint document library.

 

ExcelOnline4.png

 

There is need to have table inside excel file, but this is not a problem.

 

3. I have to prepare some variables inside Flow as the date that comes from Excel Online is in specific format - it represent count of days since 01/01/1900 so there is need to transform it to something comparable to utcnow(} that returns datetime in ISO format.

 

ExcelOnline5.png

 

All variables are strings.

 

4. I load all rows from excel sheet and for each item I compare StartDate and EndDate against current date - utcnow(). And of course as I mention there is need to transform dates from excel online to ISO format. It can be done with this expression

addDays('1900-01-01T00:00:00Z',int(item()?['Start Date']))

and the equal expression to be sure that we are inbetween StartDate and EndDate

@and(greaterOrEquals(utcnow(),variables('StartDateInt')),lessOrEquals(utcnow(),variables('EndDateInt')))

so the whole part of Flow looks like this

ExcelOnline6.png

 

5. If condition result is true there is need to store FullName in variable and then I use Office 365 users connector to lookup for Surname that I parsed from FullName of project manager via split() and last() functions, whole expression looks like this

last(split(variables('Surname'),' '))

This part of Flow looks like this

ExcelOnline7.png

I expect that FullName of project manager is combination of FirstName and Surname so I can use last after I split names by as there I expect space in firstname and lastname (surname).

 

Whole description of Search for Users is available via this link - https://docs.microsoft.com/en-us/connectors/office365users/

 

P.

Anonymous
Not applicable

Hi @vecerpa

i tried with your solution but it was disaster for me,
flow is sending email to every person in company with similar surname.
i just receive my manager email to stop these mails....
please try to understand my question....how can i send a mail to PM (name in excel file) without email address.
if i will use sharepoint list for this....can i create this type of flow,but the issue is no body wants to create item manually in sharepoint list.if yes please share some idea.
or in flow,its only for one excel file or one list or how can i use lookup column in sharepoint list to manage email ID one time in another list.

Thanks in advance


Hi @Anonymous,

 

Yes I understand you.

 

First of all, there is option to test your Flow, before you will make it available in production. And this is highly adviced as the impact to end users can be huge.

 

I don't know your enviroment so the solution that I provide should be updated or changed on your sight as you play with it and test it.

 

So if you have same surname for many persons there should some naming policy that is inside your company to create for example prefix for your UPN (user principal name) that is in format prefix@yourdomain and that prefix is somehow created and that UPN is unique for each person in your company. That can be used to get email of such user.

 

There can be also some information about role of such person like for example JobTitle that also delivered from Search User function as return body. So there can be information like Project Manager or something like that. So you can use it as another condition for email sending.

 

There is always need to find out step by step what leads to your goal. No copy paste provided solution as each enviroment is different...

P.

 

 

 

Anonymous
Not applicable

Hi @vecerpa

Thanks for your reply,
yes, agree for step by step...
but for the surname i used your idea....
and in current environment i am......not able to check the naming convention of each user in our team....

do you think this flow is possible or not ? in any simple way ?if yes please guide me exact solution.....
i tried with sharepoint list also.....with below some steps
1. create new list in sharepoint
2. copy excel items in sharepoint by using flow.
3. but pm name is text you know that...in list and excel file both....
4. How can i use pm email id in flow from second list which is also present in sharepoint in same site (contains all team member email id).
5. if possible please reply me.
6. can we fetch data from two sharepoint list in Flow and then send the mail to respective person.(please reply me but not in yes or NO....)
May be i am disturbing you....but this is urgent and pending task for me

Regards
Vikas

Hi @Anonymous,

 

Yes it can work in way you describe. You can bound a flow to trigger when for example new item in list of projects is being created, such flow can go throught list of PM names and emails and fill column in your list of projects by email of such PM.

 

There is action to load all items in SharePoint list and then you can loop through it and search for string (FullName). It will take some time to find out how match correctly FullName of PM to list in SharePoint as you mention, there can be some mutations as the name is Filled manually into excel sheet.... I can just advice you to split FirstName and SurName into separate columns and look through both separately. You should have better match.

 

Another flow will be triggered on some scheduled basis and create email notifications based on filled dates and use email that is already filled by first flow...

P.

Anonymous
Not applicable

thanks @vecerpa for prompt reply....
you are nice.....but can you please tell me how can i load two sharepoint list columns (one is original one and second for email id of PM)....can you please share one or two steps in flows (screenshot),i tried but not able to match PM name with email ID....
i know its not difficult for you.....:) 

Regards
Vikas Kaushik

Hi @Anonymous,

 

As inspiration you can do it like this:

 

SharePoint list of PMs

ExcelOnline8.png

ProjectList

ExcelOnline9.png

 

Flow

ExcelOnline10.png

ExcelOnline11.png

 

P.

Anonymous
Not applicable

Hi @vecerpa

Thanks for your support
Going step by step,everything is OK
But in the last step showing error "The execution of template action 'Update_item' skipped: the branching condition for this action is not satisfied." while update list item
Regards
Vikas Kaushik

Anonymous
Not applicable

hi again @vecerpa

i tried hard to solve the issue 
atlast i merge condition part in one by using formula "@and(equals(variables('PMFirstName'), items('Apply_to_each')?['FirstName']),equals(variables('PMSurName'), items('Apply_to_each')?['LastName']))"

and skip the yes and No part after condition....but when flow updating the poject list,it is picking any email ID against different PM name.....means if in project list pm name is janice arnaud......its updating the email column by herry.kane@.....com.....
why this happening....i am frustated.....please help...

Hi @Anonymous,

 

You have to change name of variables like 'PMFirstName' to name of variables you use in your Flow. And same is for name of columns from SharePoint list like 'FirstName' and 'LastName'  in your expression for condition. As I used those names in my SharePoint list I used for "table" of PM names and their email addresses.

There is need to adapt it to your Flow (your enviroment).

P.

Anonymous
Not applicable

Hi @vecerpa

Thanks for your response,i know you are also frustating from this....but i dont want to leave this topic now when i am very close to solve this issue.....with your help and support

please check the below steps in my environment.....its in very simple way....nothing complicated ....but project manager email picking wrong email id....

1. My project list: -

1.jpg

2. Email list (name is Email for schedule cost) where i am picking Email Address.

2.jpg

3. Flow.....
3.jpg4.jpg5.jpg6.jpg

Flow status Running successfully no error.....but result is not expected....because ProjectManagerEmail is not correctly picking....

Please reply....

Regards
Vikas Kaushik

Hi @Anonymous,

 

There have to be a space in between ' ' as the space is the separator between first name and surname like "Pavel Vecer". So there is space inbtween and that is the thing the split() function should be looking for. Otherwise it is not able to split it. You can see result of your Flow run when you for example test and there is available output of each action inside Flow, also the input. So you can debug it and see step by step what is happening.

 

First(split(triggerBody()?['ProjectManager'],' '))

P.

Anonymous
Not applicable

Hi @vecerpa

thanks for your kind support till now....Thanks for your idea.now i used only one condition with first name only.....in sharepoint list no duplicate name for our team only....
and its works fine when update any item....
can i do smilar like this for another field HOD name in same project list (head of the department)
i need to fetch two email address one is for PM and another is for HOD.
if i save HOD first name and last name with email address in same email list ?
should I enter new condition,variable or merge both for PM and HOD.

project list :- 
.........PM    PMemail   HODname   HODemail........

and email list.....

firstname     lastname    Emailadrress

If yes ,Please reply and thanks for your support....

Regards
Vikas Kaushik

Helpful resources

Announcements

Calling all User Group Leaders and Super Users! Mark Your Calendars for the next Community Ambassador Call on May 9th!

This month's Community Ambassador call is on May 9th at 9a & 3p PDT. Please keep an eye out in your private messages and Teams channels for your invitation. There are lots of exciting updates coming to the Community, and we have some exclusive opportunities to share with you! As always, we'll also review regular updates for User Groups, Super Users, and share general information about what's going on in the Community.     Be sure to register & we hope to see all of you there!

April 2024 Community Newsletter

We're pleased to share the April Community Newsletter, where we highlight the latest news, product releases, upcoming events, and the amazing work of our outstanding Community members.   If you're new to the Community, please make sure to follow the latest News & Announcements and check out the Community on LinkedIn as well! It's the best way to stay up-to-date with all the news from across Microsoft Power Platform and beyond.    COMMUNITY HIGHLIGHTS   Check out the most active community members of the last month! These hardworking members are posting regularly, answering questions, kudos, and providing top solutions in their communities. We are so thankful for each of you--keep up the great work! If you hope to see your name here next month, follow these awesome community members to see what they do!   Power AppsPower AutomateCopilot StudioPower PagesWarrenBelzDeenujialexander2523ragavanrajanLaurensMManishSolankiMattJimisonLucas001AmikcapuanodanilostephenrobertOliverRodriguestimlAndrewJManikandanSFubarmmbr1606VishnuReddy1997theMacResolutionsVishalJhaveriVictorIvanidzejsrandhawahagrua33ikExpiscornovusFGuerrero1PowerAddictgulshankhuranaANBExpiscornovusprathyooSpongYeNived_Nambiardeeksha15795apangelesGochixgrantjenkinsvasu24Mfon   LATEST NEWS   Business Applications Launch Event - On Demand In case you missed the Business Applications Launch Event, you can now catch up on all the announcements and watch the entire event on-demand inside Charles Lamanna's latest cloud blog.   This is your one stop shop for all the latest Copilot features across Power Platform and #Dynamics365, including first-hand looks at how companies such as Lenovo, Sonepar, Ford Motor Company, Omnicom and more are using these new capabilities in transformative ways. Click the image below to watch today!   Power Platform Community Conference 2024 is here! It's time to look forward to the next installment of the Power Platform Community Conference, which takes place this year on 18-20th September 2024 at the MGM Grand in Las Vegas!   Come and be inspired by Microsoft senior thought leaders and the engineers behind the #PowerPlatform, with Charles Lamanna, Sangya Singh, Ryan Cunningham, Kim Manis, Nirav Shah, Omar Aftab and Leon Welicki already confirmed to speak. You'll also be able to learn from industry experts and Microsoft MVPs who are dedicated to bridging the gap between humanity and technology. These include the likes of Lisa Crosbie, Victor Dantas, Kristine Kolodziejski, David Yack, Daniel Christian, Miguel Félix, and Mats Necker, with many more to be announced over the coming weeks.   Click here to watch our brand-new sizzle reel for #PPCC24 or click the image below to find out more about registration. See you in Vegas!       Power Up Program Announces New Video-Based Learning Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram. These include a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the image below to find out more!   UPCOMING EVENTS Microsoft Build - Seattle and Online - 21-23rd May 2024 Taking place on 21-23rd May 2024 both online and in Seattle, this is the perfect event to learn more about low code development, creating copilots, cloud platforms, and so much more to help you unleash the power of AI.   There's a serious wealth of talent speaking across the three days, including the likes of Satya Nadella, Amanda K. Silver, Scott Guthrie, Sarah Bird, Charles Lamanna, Miti J., Kevin Scott, Asha Sharma, Rajesh Jha, Arun Ulag, Clay Wesener, and many more.   And don't worry if you can't make it to Seattle, the event will be online and totally free to join. Click the image below to register for #MSBuild today!   European Collab Summit - Germany - 14-16th May 2024 The clock is counting down to the amazing European Collaboration Summit, which takes place in Germany May 14-16, 2024. #CollabSummit2024 is designed to provide cutting-edge insights and best practices into Power Platform, Microsoft 365, Teams, Viva, and so much more. There's a whole host of experts speakers across the three-day event, including the likes of Vesa Juvonen, Laurie Pottmeyer, Dan Holme, Mark Kashman, Dona Sarkar, Gavin Barron, Emily Mancini, Martina Grom, Ahmad Najjar, Liz Sundet, Nikki Chapple, Sara Fennah, Seb Matthews, Tobias Martin, Zoe Wilson, Fabian Williams, and many more.   Click the image below to find out more about #ECS2024 and register today!     Microsoft 365 & Power Platform Conference - Seattle - 3-7th June If you're looking to turbo boost your Power Platform skills this year, why not take a look at everything TechCon365 has to offer at the Seattle Convention Center on June 3-7, 2024.   This amazing 3-day conference (with 2 optional days of workshops) offers over 130 sessions across multiple tracks, alongside 25 workshops presented by Power Platform, Microsoft 365, Microsoft Teams, Viva, Azure, Copilot and AI experts. There's a great array of speakers, including the likes of Nirav Shah, Naomi Moneypenny, Jason Himmelstein, Heather Cook, Karuana Gatimu, Mark Kashman, Michelle Gilbert, Taiki Y., Kristi K., Nate Chamberlain, Julie Koesmarno, Daniel Glenn, Sarah Haase, Marc Windle, Amit Vasu, Joanne C Klein, Agnes Molnar, and many more.   Click the image below for more #Techcon365 intel and register today!     For more events, click the image below to visit the Microsoft Community Days website.      

Tuesday Tip | Update Your Community Profile Today!

It's time for another TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   We're excited to announce that updating your community profile has never been easier! Keeping your profile up to date is essential for staying connected and engaged with the community.   Check out the following Support Articles with these topics: Accessing Your Community ProfileRetrieving Your Profile URLUpdating Your Community Profile Time ZoneChanging Your Community Profile Picture (Avatar)Setting Your Date Display Preferences Click on your community link for more information: Power Apps, Power Automate, Power Pages, Copilot Studio   Thank you for being an active part of our community. Your contributions make a difference! Best Regards, The Community Management Team

Hear what's next for the Power Up Program

Hear from Principal Program Manager, Dimpi Gandhi, to discover the latest enhancements to the Microsoft #PowerUpProgram, including a new accelerated video-based curriculum crafted with the expertise of Microsoft MVPs, Rory Neary and Charlie Phipps-Bennett. If you’d like to hear what’s coming next, click the link below to sign up today! https://aka.ms/PowerUp  

Super User of the Month | Ahmed Salih

We're thrilled to announce that Ahmed Salih is our Super User of the Month for April 2024. Ahmed has been one of our most active Super Users this year--in fact, he kicked off the year in our Community with this great video reminder of why being a Super User has been so important to him!   Ahmed is the Senior Power Platform Architect at Saint Jude's Children's Research Hospital in Memphis. He's been a Super User for two seasons and is also a Microsoft MVP! He's celebrating his 3rd year being active in the Community--and he's received more than 500 kudos while authoring nearly 300 solutions. Ahmed's contributions to the Super User in Training program has been invaluable, with his most recent session with SUIT highlighting an incredible amount of best practices and tips that have helped him achieve his success.   Ahmed's infectious enthusiasm and boundless energy are a key reason why so many Community members appreciate how he brings his personality--and expertise--to every interaction. With all the solutions he provides, his willingness to help the Community learn more about Power Platform, and his sheer joy in life, we are pleased to celebrate Ahmed and all his contributions! You can find him in the Community and on LinkedIn. Congratulations, Ahmed--thank you for being a SUPER user!

Tuesday Tip: Getting Started with Private Messages & Macros

Welcome to TUESDAY TIPS, your weekly connection with the most insightful tips and tricks that empower both newcomers and veterans in the Power Platform Community! Every Tuesday, we bring you a curated selection of the finest advice, distilled from the resources and tools in the Community. Whether you’re a seasoned member or just getting started, Tuesday Tips are the perfect compass guiding you across the dynamic landscape of the Power Platform Community.   As our community family expands each week, we revisit our essential tools, tips, and tricks to ensure you’re well-versed in the community’s pulse. Keep an eye on the News & Announcements for your weekly Tuesday Tips—you never know what you may learn!   This Week's Tip: Private Messaging & Macros in Power Apps Community   Do you want to enhance your communication in the Community and streamline your interactions? One of the best ways to do this is to ensure you are using Private Messaging--and the ever-handy macros that are available to you as a Community member!   Our Knowledge Base article about private messaging and macros is the best place to find out more. Check it out today and discover some key tips and tricks when it comes to messages and macros:   Private Messaging: Learn how to enable private messages in your community profile and ensure you’re connected with other community membersMacros Explained: Discover the convenience of macros—prewritten text snippets that save time when posting in forums or sending private messagesCreating Macros: Follow simple steps to create your own macros for efficient communication within the Power Apps CommunityUsage Guide: Understand how to apply macros in posts and private messages, enhancing your interaction with the Community For detailed instructions and more information, visit the full page in your community today:Power Apps: Enabling Private Messaging & How to Use Macros (Power Apps)Power Automate: Enabling Private Messaging & How to Use Macros (Power Automate)  Copilot Studio: Enabling Private Messaging &How to Use Macros (Copilot Studio) Power Pages: Enabling Private Messaging & How to Use Macros (Power Pages)

Users online (4,338)