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 / Extracting data from S...
Power Automate
Unanswered

Extracting data from Sharepoint

(0) ShareShare
ReportReport
Posted on by 2
Hi 
Hopefully you can help I am trying to pull back from Sharepoint the data for the most recent week to then post a message in teams.
What is the most effective way to do this?
Thanks
Categories:
I have the same question (0)
  • Tomac Profile Picture
    3,951 Moderator on at
    In your Get Items or Get Files or whatever action, for the ODATA filter try the following:
    Modified ge '@{addDays(if(equals(dayOfWeek(utcNow()),0),addDays(utcNow(),-6),addDays(utcNow(),sub(0,sub(dayOfWeek(utcNow()),1)))),6)}' and Modified It '@{convertTimeZone(utcNow(),'UTC','Eastern Standard Time')}'
    This will find items beginning the previous Sunday to today.
     
    If you want the last 7 days directly, try this:
    Modified ge '@{addDays(convertTimeZone(utcNow(),'UTC','Eastern Standard Time'),-7)}' and Modified It '@{convertTimeZone(utcNow(),'UTC','Eastern Standard Time')}'
     
  • Chriddle Profile Picture
    8,443 Super User 2025 Season 2 on at
    Do you really expect to receive emails from the future?
     
    And I assume you're converting the time zone to account for a possible date shift.
    However, to do this, you'll need to remove the time portion from utcNow [utcNow('yyyy-MM-dd')].
     
  • JA-07071638-0 Profile Picture
    2 on at
    Thank you for your help on this
    Wanted to look at the line for the week commencing 7/7/25 ie on the current Monday of the week (its only 1 line), would I still need to add + days 
     
  • Tomac Profile Picture
    3,951 Moderator on at
    For strictly the last 7 days, you only need this statement:
    Modified ge '@{addDays(convertTimeZone(utcNow(),'UTC','Eastern Standard Time'),-7)}'
    It adds negative 7 days, to get a date 7 days prior. You'd also adjust the timezone to match where you are, I'm in Eastern time. So running this on Monday July 7th at 10AM would pull everything beginning Monday June 30th 10AM and newer.
     
    I prefer to put hard bounds on both sides (as in the original last 7 days statement) but that's simply my own double-and-triple-check-everything brain. YMMV

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard