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/