web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Feedback loop for an e...
Power Automate
Unanswered

Feedback loop for an e-mail

(0) ShareShare
ReportReport
Posted on by 49

I have table at sharepoint which consist of manager name , manager email id , market and percentage difference.For example 

NameEmailMarketPercentage Difference
M1m1@gmail.comA20%
M2m2@gmail.comB30%
M1m1@gmail.comC45%
M2m2@gmail.comD50%
M2m2@gmail.comE65%

 

now I want to send mail to these  manager in the such a way that M1 should get his respective market and percentage difference only in the mail and similarly other managers should only receive market name and percentage difference which belongs to them.For example M1 should get mail in this format

Subject: Inventory Count Difference Alert - <Date>

Body:

Hi M1,

 

One or more accounts you manage need your attention

  1. Market: A, 20%
  2. Market: C, 45% 

 

Please click here to view the dashboard for more details.


Thanks

The Team

Similarly M2 should get market B,D,E  in the following format.I have created this flow using following steps :

First as shown above, I have  initialize a variable emailbody_part which represents the below part 

  1. Market: A, 20%
  2. Market: C, 45%

 

Next I have retrieve items from list using get items.

Next I have retrive Name only from list of  values obtained from get items output , use select action for that.

 

 

Deepanshu03_0-1690128905568.png

 

 

 

Next below, in Apply to each loop, loop through using below expression which gives unique list of Names obtained from select action output 

union(body('Select'),body('Select'))
 
Inside the loop do the below steps
 
1. Use filter array to filter only values from values variable which would have Name equal to that of current iterating Name.
 
2. Now create another loop which will loop through list of rows obtained from filter array and then create the test for merket details and percentage difference.
 
3. Outside the loop, created in step 2, send an email using emailbody_part variable including in the email body to manager's email id. 
 
4. Reset the value of emailbody_part to null.

see the below screenshots for better idea.
 
Deepanshu03_1-1690128938436.png

 

 

Deepanshu03_2-1690128938230.png

 

 

Deepanshu03_3-1690128938239.png

 

expression: 

concat(string(items('Apply_to_each_2')),'. Market: ',body('Filter_array')?[sub(items('Apply_to_each_2'),1)]?['Market'],',',body('Filter_array')?[sub(items('Apply_to_each_2'),1)]?['Percentage Difference'],decodeUriComponent('%0A')).

Now I want to include the option of whether that manager as taken any action for that market or not by adding option for selection as yes or no for each market in the mail and store that response for each market with market name in the sharepoint as separate list.How can I create this flow.Basically I just want to create a feedback whether the concern managers have taken any action for the markets specified in the mail or not. Please suggest any alternative methods or approaches to implement this, if you know of any. Your guidance will be highly appreciated! Thanks in advance for your kind help.

 

Categories:
I have the same question (0)
  • abm abm Profile Picture
    32,865 Most Valuable Professional on at

    Hi @Deepanshu03 

     

    Are you expecting to collect the Yes/No action response via email? Send email with options  or have a look on Power Automate Approvals.

     

    Thanks

  • Deepanshu03 Profile Picture
    49 on at

    Hi @abm , thanks for your response. Actually the task is I want to send an alert email to managers with market names and percentage difference which belongs to them. But I also wanted to develop a feedback loop so that for example if Manager M1 has to  take action on market A and B and he has only taken action for market A and not for market B , I can send the alert mail with market B only this time again to that manager M1.For this I want to get a response from manager whether they have taken any action for markets specified in his mail or not.And then I want to store those responses on the share point and then will use that share point list to send the alert mail again to the managers with the markets names for which they have not taken any action.

    For e.g., I would send an another email  in which along with the market name , in each row, there would be a question column, asking if they have taken any action with a yes or no response. 
  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @Deepanshu03 ,

     

    Here's my approach.

     

    trice602_0-1690135404087.png

     

    trice602_1-1690135433090.png

    trice602_2-1690135468729.png

     

    trice602_3-1690135509218.png

    trice602_4-1690135569240.png

     

    Instead of using a Yes/No approval/acknowledge feedback option, I prefer to ask the manager to post their comments directly in the SharePoint List item and provide the link to the list in the email. 

     

    trice602_5-1690135680412.png

     

    If this was helpful, please mark as a solution.  Always glad to help! Tom

  • Deepanshu03 Profile Picture
    49 on at

    Hi @trice602 , thanks for your reply. How can I automatically come to know that whether all the managers have posted their comment in the sharepoint list or not so that I can reinitiate the flow of sending the alert mail to the managers with the market names where they have not taken any action.

  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @Deepanshu03 ,

     

    One approach is to simply update your SharePoint list items with a [date notified] column at the end of flow 1.  Then you write a separate flow that says if the [last update] <= [date notified], send follow-up email.  But having said that, I would have this as a completely separate flow and not part of the first.  So think of it this way:  flow1's job is to send market status emails, flow2 is to follow-up on missing actions/comments.  As I mentioned, simply have the managers click on the item and post their updates/actions/comments/notes in the Comment field that automatically appends notes with who and when for tracking.  Please mark as a solution if this was helpful!  Always glad to help! Tom

  • Deepanshu03 Profile Picture
    49 on at

    One more question @trice602 . Please let me know if I am wrong. We are creating a list in sharepoint and will share that with managers where he can add his comment and action. But in that case that list will have all the markets names and that manager need to respond  in front of only those rows which has market corresponding to him.What if I want to show only those market names which correspond to him and not all the markets in the list.

  • Verified answer
    trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Hi @Deepanshu03 ,

     

    One approach is to create individual views in SharePoint and then in your email notification, you are sending the dynamic view link.    This way when M1 clicks through, they will only see their items.  Please mark as a solution and give me a thumbs up (I'm collecting badges and kudos)!  Always glad to help! Tom

     

    trice602_0-1690137825235.png

     

    trice602_1-1690137949119.png

     

     

  • Deepanshu03 Profile Picture
    49 on at

    Hi @trice602 , there is a small change. I can not use sharepoint list to get responses of the manager. I can use the sql server only. Initial table which I am using to send out alert email will also be available on sql server only and not on sharepoint. Can I implement the same approach you are suggesting using sql server ?

  • trice602 Profile Picture
    15,402 Super User 2025 Season 2 on at

    Sure, I think so.  Instead of getting your SharePoint list items, you are running a SQL query, the selecting rows, and performing the same steps.  I did something similar with my Azure tables and don't remember anything weird happening using the same approach.  Always glad to help!  Tom

  • Deepanshu03 Profile Picture
    49 on at

    Hi @trice602 ,suppose I want a comment from each manager.So when M1 opens his link he will redirected to the SharePoint list view that displays only their items, and then M1 adds comments for all of his item.similar for M2. Now will I have all the comments in one list or in separate list of managers.

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard