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 / flux permettant d'envo...
Power Automate
Suggested Answer

flux permettant d'envoyer automaiqutement des mails une fois que la condition est respectée

(1) ShareShare
ReportReport
Posted on by 4
Bonjour, suite a la reponse a ma question concernant le flux planifié permettant d'envoyer automatiquement les mails a ceux qui auront une echéaence de fin de contrat dans 7 jours ou dans 1 jour; j'ai réssayé cela n'a pas marché.

est-ce que qqcn pourrait m'aider avec l'expression dans la condition?
merci
I have the same question (0)
  • Suggested answer
    11manish Profile Picture
    2,349 on at
    For a scheduled Power Automate flow that sends emails when a contract is expiring in 7 days or 1 day, the issue is usually caused by:
    • date format mismatch,
    • time zone differences,
    • comparing full datetime instead of only the date.
    Recommended Solution
    Best Practice
    • Convert both dates to the same format (yyyy-MM-dd) before comparing.
  • Suggested answer
    Valantis Profile Picture
    5,312 on at
     
    To help with the exact expression, what's your data source? SharePoint, Dataverse, Excel?
     
    In the meantime here's the general pattern for checking if a contract expires in exactly 7 or 1 day inside a Condition action:
     
    For 7 days:
    - Left side: formatDateTime(item()?['ExpiryDate'], 'yyyy-MM-dd')
    - Operator: is equal to
    - Right side: formatDateTime(addDays(utcNow(), 7), 'yyyy-MM-dd')
    Add a second row with OR for 1 day:
    - Left side: formatDateTime(item()?['ExpiryDate'], 'yyyy-MM-dd')
    - Operator: is equal to
    - Right side: formatDateTime(addDays(utcNow(), 1), 'yyyy-MM-dd')
    Replace ExpiryDate with your actual column name.
     
    The key is formatting both dates to yyyy-MM-dd so the comparison strips the time component. Without this, dates never match because they include timestamps.
    If you're using SharePoint, it's better to filter directly in the Get items action using an OData filter instead of looping through all records. Share your data source and I'll give you the exact expression.
     

     

    Best regards,

    Valantis

     

    ✅ If this helped solve your issue, please Accept as Solution so others can find it quickly.

    ❤️ If it didn’t fully solve it but was still useful, please click “Yes” on “Was this reply helpful?” or leave a Like :).

    🏷️ For follow-ups  @Valantis.

    📝 https://valantisond365.com/

    💼 LinkedIn

    ▶️ YouTube

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard