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 / Send E-mail reminder b...
Power Automate
Answered

Send E-mail reminder based om expiration date and days befor experation both values in SharePointlist

(0) ShareShare
ReportReport
Posted on by 9

Hello,

 

I have a question how to approach the following solution. 

I want to send a weekly mail on the moment the today date is equal of within the days before the expiring date of the contract.

 

The value of the days before expiring are stored in the column "Opzegtermijn_x0028_dagen_x0029_" and the Expiring date is stored in the column "Einddatum".

This is how I approached it:

 

image1.png

 

The Expression I used for dynamic content is:
formatDateTime(addDays(utcNow(),int(coalesce(triggerOutputs()?['headers']['Opzegtermijn_x0028_dagen_x0029_'], '0'))),'yyyy-MM-dd')

 

But it looks like the value in 'Opzegtermijn_x0028_dagen_x0029_' is always null. 

 

But if I look at the output (below) the field/column is filled.

image2.png

 

Does anyone know a solution?

Categories:
I have the same question (0)
  • abouchaalaBAIT Profile Picture
    932 Moderator on at

    Hello @DennisHass 

    Here is how i would do it 

    1. Reccurence
    2. create DaysBefore variable
    3. create  ExpiringDate variable
    4. create TargetDate variable
    5. Get all SharePoint items 
      1. Foreach SP Item
      2. Store Einddatum in DaysBefore variable
      3. Store Opzegtermijn_x0028_dagen_x0029_ in ExpiringDate variable
      4. Calculate the TargetDate (ExpiringDate - DaysBefore) : using addDays function and store it in TargetDate variable 
      5. Condition if utcnow() between both date => send email else do nothing. 

    The optimal way will be to Get all SharePoint items that you need by filtering from the beginning.

     

    Hope this helps

      ----------------------------------------------------------
    If I have answered your question, please mark your post as Solved. 🆗✔️
    If you like my response, please give it a Thumbs Up. 👍
    You can accept more than one post as a solution.

  • Verified answer
    DennisHass Profile Picture
    9 on at

    Thank you, that's an approach that could work. 

     

    I've come up with a different approach.
    formatDateTime(addDays(utcNow(),int(items('Apply_to_each_-_mail_naar_iedere_contractbeheerder')?['Opzegtermijn_x0028_dagen_x0029_'])),'yyyy-MM-dd')

    That did the trick.

     

    Thanks for your suggetion. 

     

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…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 339 Super User 2025 Season 2

#1
trice602 Profile Picture

trice602 339 Super User 2025 Season 2

#3
David_MA Profile Picture

David_MA 270 Super User 2025 Season 2

Last 30 days Overall leaderboard