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 / Scheduled occurrence f...
Power Automate
Suggested Answer

Scheduled occurrence flow - 1st of every month trigger

(0) ShareShare
ReportReport
Posted on by 2
Hello,
 
I am trying to build a flow which does the followings:
  1.  1st of the month the flow gets triggered.
  2.  Initialize variable to store a date information that is 31 days in the past from today.
  3.  Compare the date from step 2 to a date in the date column in the folder that is in the specific document library.
  4. If files in that document library include the date greater than 31 days in the past from today, get those files. (Example: If the flow was triggered on November 1st, it looks for files that were added between October 1st and 31st.)
  5.  After getting those files, names and links of the file will be added to an email (HTML table) and send the email to a group of people.
The 'image 001' is my attempt.
The 'image 002' is a test result. I got an error message below.
 
Error message: String was not recognized as a valid DateTime. Creating query failed.
clientRequestId: 2cff8e02-037a-4ae7-a483-435eec7e2be8
serviceRequestId: e5db5ca1-1028-6000-c07d-06d7da2a2a7c
 
I am not familiar with complicated flows and having a problem moving forward with this one... Any suggestions will be appreciated. Thank you so much for your help in advance!!
Categories:
I have the same question (0)
  • Suggested answer
    narayan225 Profile Picture
    2,547 Super User 2025 Season 2 on at
    The approach is good but your execution is not working properly.
     
    You using the comparison incorrectly when filtering SharePoint items.
    Please do following:
    1. Instead of creating a variable, use the formula to calculate the date 31 days from today.
    2. Use the expression with filter query to get the data.
    Example below:
     
    Hope this helps.
    Cheers!
  • RL-23102218-0 Profile Picture
    2 on at
    Thank you for your suggestion, @narayan225. Can I use "Get items" action for a document library though? My impressions is that "Get items" is for a list and "Get files" is for a document library...
  • narayan225 Profile Picture
    2,547 Super User 2025 Season 2 on at
    Hi,
     
    You can use Get Files action if get items doesn't fulfil your requirement.
     
    Cheers!
     

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