cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
devaaron
Helper III
Helper III

Using Power Automate with Sharepoint for email reminder

Hi guys,

 

Can I please get some help for this problem that I am trying to solve using Power Automate? 

 

Description/Scenario:

I would like to send email reminders to the students who did not submit their assignments at the end of every week. Whenever they complete their assignment, their names would show up in a Sharepoint list. In the same Sharepoint site, I have a number of students names and ID in an excel file to make comparison with the Sharepoint list. So whoever name is not on the SharePoint list, I want to send them an email reminder and I want to do this for every end of the week please. 

 

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
PrasadAthalye
Super User
Super User

You can design flow something like below. Change Trigger to Schedule flow instead of manual...

  • Create a table within excel by supplying range.
  • Add List Rows and point to excel.
  • Now loop through each row from excel and filter GetItems from SharePoint by matching SharePoint column name with excel.
  • Add SharePoint Column name to Array variable. If GetItems does not return anything, you dont have a match. Add Email address of the person from excel to array.
  • Finally  use send email action by looping through this array. You can alternatively not create array variable and directly add send email action instead in the loop.

PrasadAthalye_1-1623373936047.png

 

 

 

PrasadAthalye_0-1623373608424.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

8 REPLIES 8
PrasadAthalye
Super User
Super User

You can design flow something like below. Change Trigger to Schedule flow instead of manual...

  • Create a table within excel by supplying range.
  • Add List Rows and point to excel.
  • Now loop through each row from excel and filter GetItems from SharePoint by matching SharePoint column name with excel.
  • Add SharePoint Column name to Array variable. If GetItems does not return anything, you dont have a match. Add Email address of the person from excel to array.
  • Finally  use send email action by looping through this array. You can alternatively not create array variable and directly add send email action instead in the loop.

PrasadAthalye_1-1623373936047.png

 

 

 

PrasadAthalye_0-1623373608424.png

 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

View solution in original post

Campbell22
Helper I
Helper I

Hey @devaaron,

 

Exactly as @PrasadAthalye said you need to follow his flow design. 

 

The first step you will need to complete if you haven't already is turn your excel spreadsheet into a table, this will allow flow to read the information inside of that table. To do this just highlight your chosen area in excel and go to the insert tab and insert a table. 

Campbell22_0-1623375814914.png

 

On the flow use a reoccurrence trigger and set it to trigger 1 weekly and in advance options you can define a day and time for the flow to trigger.

Additionally, add the List rows present in a table action, and put flow to your files location within SharePoint.

 

Campbell22_2-1623376002803.png

 

Get the SharePoint list where the students uploaded their assignments to and filter to see which students have uploaded their assignment and which ones have not. The filter query should look something similar to this; Title eq 'Student Names'. Where title is the column name in your SharePoint list and Student Names is your column name in your excel spreadsheet. Student names should be dynamic content from the excel action.

 

Using a condition we can filter to see if the student has uploaded their file to SharePoint or not. If the value returned from Get Items is greater than 0 it means there is an item assigned to that student and therefore no action is required. If the value is 0 then no item is assigned so send an email to that student to remind them to upload there assignment. The formula is; 

length(outputs('Get_items')?['body/value'])

Campbell22_3-1623376785437.png

Campbell22_4-1623377275585.png

 

 

The Send an Email actions, email is from excel and any content from excel can be added to the email.

 

Cheers 

Campbell

 

 

_____________________________________________________________________________________________________________________
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

 

Thank you @Campbell22 and @PrasadAthalye 

both of the flows are looking promising. I will try both and let you know.

 

Thank you

Thank you to @PrasadAthalye and @Campbell22. Both of the solutions are correct but I can only select one. Really appreciated for both of the solution.

Hi @PrasadAthalye 

Could you please share the flow screenshots for each step because I am messing at some point. It does not make comparison. Also how can we add another filter to SharePoint item to only pick approved value from student's status column so now we are looking if the names matching plus if the status is approved. 

 

I really appreciated! Thanks 

In the GetItems Filter you can add a filter condition.. Something like below. Ensure to use correct status column name and Approved value. Also which comparison is not working?

 

status eq 'Approved' 

Please Like and Mark this as Answer if it resolves your Issue.

Power Automate Community

Hi @PrasadAthalye ,

let me tell you each step i followed then maybe you can help for the steps

1.in the first step I listed rows present in a table - here I took everything from the table including student names and emails --No filter yet!!

2.Initialise variable I add value studentName and choose array then named it as StudentName

3.Get Items from SharePoint choose the list name and add filter as Title eq'studentName'

4.Added condition as if length greater than 0 if yes do nothing if no send an email

 

 

Right now the flow does nothing with the SharePoint list. It sent everyone email regardless. I would like to send an email with two condition first who did not have their name in the SharePoint list (compared to the excel file which contains all my student's name and emails in table format) and secondly their AssignmentStatus is 'Submit for Approval' or 'Rejected'. therefore, they will know they have not submit their assignment at all or they did not approve the assignment submission by friday afternoon every week. 

 

 

I am not quite sure what you have add in your filters for each step of the flow including list rows, initialise variable, get items in SharePoint, or condition. Can you please compare my path with your and potentially tell me where was wrong?

 

 

Thank you!!!

devaaron
Helper III
Helper III

Hi @Campbell22,

 

I tried this flow. It seems like it's working but it sends email to everyone in the excel file although they have their name appeared in the SharePoint list. Could you please help me with that? I have changed the name in excel StudentsName just like the SharePoint list. I have added filters for both Excel and SharePoint but In excel it does not pick up the table column as dynamic. Also I would like to add a condition to the SharePoint list to email students if their status in the list is not ‘Approved’.

 

Thank you in advance and much appreciated for all the help.

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,503)