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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Sending items when dat...
Power Automate
Answered

Sending items when date is greater or equals to three weeks from today

(0) ShareShare
ReportReport
Posted on by 103

Hello all, I am currently working on an agenda distribution in sharepoint. I would like to send out the list item in a table where the 'presentation request date' are between today to 21 days from today to the distribution list.

 

I got the table and e-mail part to work, but it sends all items. I am now stuck in the filter array part to filter these dates. help!!

 

 

Categories:
I have the same question (0)
  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    This is exactly what I am trying to do but I am competely lost. Which flow do I start with? Can you please explain how you made it? Thanks!

  • HWib Profile Picture
    103 on at

    I followed the steps in the following post to create the HTML table. 

    https://powerusers.microsoft.com/t5/General-Flow-Discussion/Modify-Create-HTML-Output-for-formatting-purposes/td-p/125892

     

    The flow looks like this. For Compose I have the following expression: 

    replace(body('Create_HTML_table'),'<table>','<table border="1">')
     
    not sure how I should add the filter to send only those specific items with the presentation request date between those dates. Hope this helps to get you started.
     

     

    2019-02-15_8-31-57.png

     

    2019-02-15_8-37-28.png

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Yes, I think what you are trying to do is create create the html table based off a filter. I'll look into this as well and post back if I find the solution. Thanks for sharing!

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @HWib ,

     

    You could first configure Filter query in Get items action to filter out the eligible items, and then configure the following action.

    Image reference:

    30.PNG

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

    29.PNG

    Note that the expression needs to be enclosed in single quotes.

    Please take a try.

     

    Best Regards,

  • HWib Profile Picture
    103 on at

    Thanks, Barry.

    I received this error message when using your suggestion:

    { "status": 400, "message": "The expression \"PresentationRequestDate'2019-03-13'\" is not valid.\r\nclientRequestId: 15de0362-c53c-4f6c-8307-7617c80a21cb\r\nserviceRequestId: 5bf5c19e-208c-7000-fec6-667bbec34875" }

     

    2019-02-20_15-34-37.png

     

    This is how I inputted the query. PresentationRequestDate is the name of the field from which the query is being filterred:

    2019-02-20_15-42-55.png

     

  • HWib Profile Picture
    103 on at

    added ge in between the field name and the expression and flow was sent. 

    However, none of the data within the intended parameter (today up to 21 days from today) has been sent.

     

    Here is the mock data that should have been sent:

    2019-02-20_15-52-26.png

     

    Here is the e-mail received:

    2019-02-20_15-53-44.png

     

  • v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @HWib ,

     

    Please change ge to le.

    Maybe I understand the conditions of your fault.

    It seems that you want the Date of the Request Date to be less than or equal to today plus 21 days.

    Please take a try again.

     

    Edit:

     

    If there is a space in the middle of the field name, replace the space with _x0020_ .

    Like:

    Presentation_x0020_Request_x0020_Date

     

    Best Regards,

  • HWib Profile Picture
    103 on at

    Hi Barry,

     

    Thanks for the feedback and suggestion.

     

    The parameter would be Presentation Date is equal to or greater than today to less than or equal to 21days from today. I would need to have an 'And' operator in the expression, although I am not sure how to add that.

     

    The agenda gets send out, but now it includes dates that are in the past.

    2019-02-21_14-59-19.png

     

     

    Here is the screenshot from the Flow:

    2019-02-21_14-58-50.png

  • Verified answer
    v-bacao-msft Profile Picture
    Microsoft Employee on at

    Hi @HWib ,

     

    Try using the formula below:

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

    1.PNG

     

    Best Regards,

  • HWib Profile Picture
    103 on at

    great it works!!! thanks, Barry!

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 77 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 68

#3
Expiscornovus Profile Picture

Expiscornovus 56 Most Valuable Professional

Last 30 days Overall leaderboard