I'm currently new to Microsoft Flow.
My scenario is whenever an Excel file has been created in SharePoint, it will automatically send an email to specific person according to file name.
The logic is that Excel file naming is the person name, then Flow can get the ID or contact email that will be then send to that specific person.
For example, Excel file name "Amily.xlsx" has been created, then it'll automatically send an email to Amily.
Excel file name "John.xlsx" created, it'll then send an email to John.
Could this scenario work by using Microsoft Flow?
I have try create some flow as per below but it didn't work:
You can likely achieve your goal by parsing the filename with extension (use the split() expression and the Office 365 Users search for users action. That said, this isn't a great approach in a large organization.
Please see my example below. Any expressions that I used can be seen in the comments area for the associated action. The split expression is necessary because of your requirement to send an email only for Excel files - that means you need the file extension.
If you use this solution, you'll probably want to add logic to handle situations where the user cannot be found.
Name from the trigger already does not have file extension so no need to use split.
make sure you put a ; in-between each email address in the email action.
Few other things to note:
1) Get my profile action will get the user that the connection is setup for. Select fields is optional.
2) As mentioned above search for users is what you need
I suggest you add a meta-data field with Person type, and get them to populate the user in there as Scott mentions in a big organisation there will be lots of John's
Hi @NVisa ,
Please refer to screenshot below to create the flow:
Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
First of all, thank you for all your replies and sorry for late response, I have tried all approached that you guys suggested but it still didn't work when I place excel file with Employee Full name. I also make sure to use ; in the between each mail address.
At first I suspect it could be that my SharePoint site was confidential site, then I request IT to change to Public site. The flow still didn't work.
When I test those approaches, it always end up with this below:
I think it might be because it can't fetch up an employee's email from organization with only full name?
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!