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 / Making a flow that sen...
Power Automate
Unanswered

Making a flow that sends an automated email with previous week's info

(0) ShareShare
ReportReport
Posted on by 14

Hi,

 

I have some experience making flows but I've never created one with this specific function.

 

I need to send out an automated email that gets items from a SharePoint list but only information from the last 7 days.

(Additional: If I could get it to only get items that are 'pending' from the last 7 days that would be even better!)

 

For context, the SharePoint page is used to track approvals so we want to know which are outstanding and update our team with these emails every week. Below is an image of the 'choice' column I created in my SharePoint list for approvals:

MattConn_0-1669974660083.png

If I could automatically send the last 7 days of pending approvals on weekly emails that would be fantastic! Any help is appreciated.

 

Thanks!

Categories:
I have the same question (0)
  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @MattConn,

    Do you want to send email every week with the pending Items in the last 7 days?

     

    Here is a simple demo, please check for reference:

    vqiaqimsft_4-1670217916640.png

     

    addDays(utcNow('yyyy-MM-dd'),-7)

     

    vqiaqimsft_1-1670217157547.png

    Here is the testing result.

    vqiaqimsft_2-1670217169550.png

     

     

  • MattConn Profile Picture
    14 on at

    Thank you for this demo. Most of this appears to work. The only error I've noticed when debugging it is the filter query. Since sending the original post. I now need to include two options from that column. One for 'Pending' and another for 'Requested'. I haven't changed my SharePoint and for some reason it says status doesn't exist. Whenever I test and use that filter query, it says the below:

     

    MattConn_0-1670239519139.png

     

    Am I doing something wrong?

     

  • v-qiaqi@microsoft.com Profile Picture
    on at

    HI @MattConn,

    In your scenario, you do not have the Satatus column but you have this Approval column, replace the Status with Approval column.

  • MattConn Profile Picture
    14 on at

    Thank you Qi! This is working now! 🙂 So if I wanted to filter other options in my approval column in the future. How would I do that? What if I wanted to get 'pending' and 'requested' items? 

     

    Also, is there a way to make this look nicer on the email and just have the words pending/requested rather than all this text?

    MattConn_0-1670578334224.png

     

  • MattConn Profile Picture
    14 on at

    Hi Qi, I actually figured that first part out myself: 

    MattConn_1-1670578611080.png

    I just need help getting rid of the unnecessary text in the above response so the email looks nicer and easier to read for the team. I may have done something incorrect at this step:

    MattConn_2-1670578992938.png

     

     

    Thank you for your support!

     

     

  • MattConn Profile Picture
    14 on at

    Hi Qi, I just need the text above to disappear so it only shows 'pending'. Once I've fixed that this flow is complete. 🙂 Thanks, Matt

  • Verified answer
    v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @MattConn,

    Sorry, I should remind you of that at the very beginning.😅

     

    First of all, make sure that your Approval is a Choice column.

     

    Then the expression you set in the Filter query is correct, howeve, you should modify your item() function if your Approval column is Choice type:

    item()?['Approval/Value']

    vqiaqimsft_0-1671507250276.png

     

  • MattConn Profile Picture
    14 on at

    Thank you for all your help Qi. This flow is now up and running as intended! 😁

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