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 / Subtract SharePoint li...
Power Automate
Unanswered

Subtract SharePoint list date from current date then send an email with HTML.

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have a SP list with friendly dates associated with each item. The SP list also has a "Status" column. I have filtered the information coming in using Filter Query in the "Get Items" action to only pull data that says "Past Due" in the status column. I want to take those items date values and subtract them from the current date. I have the formula for current date in ticks using Compose and a way to get the ticks for the SP list item dates. My problem occurs when I try to subtract the 2 numbers and send them as an HTML. I cannot figure out how to subtract the 2 numbers and when I try to send a basic HTML with the SP date as a tick value I get duplicate entries. For example.... there are 5 past due items and instead of receiving one email with the HTML table listing those 5 items, I receive 5 emails listing the same item 5 times. Any ideas or better solutions that will allow me to add a time of how long an item has been past due based off the current date and items date?

Categories:
  • wskinnermctc Profile Picture
    6,519 Moderator on at

    Without screenshots, I'm guessing your flow goes something like "Get Items" > Apply to Each [Compose Time Value > Send Email ] > End Flow. Where the Compose Time and Send Email are in the Apply to Each.

     

    The issue is that the Send Email is within the Apply to Each. So it is sending an email for each item.

     

    You will need to do something were the time compose for each item is added to an Array Variable. Then outside of the Apply to Each, you will put that array into a format HTML table, then send a single email with that HTML table inside of it. 

     

    Kind of like Adding each item's info into a bucket, and then in an email including that bucket.

     

    Don't have an exact example, but trying to point you in the right direction

     

    https://charleslakes.com/2022/11/28/power-automate-outlook-emails-w-item-list/ 

     

    https://www.enjoysharepoint.com/power-automate-array-variable/

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 227 Super User 2026 Season 2

#2
11manish Profile Picture

11manish 221 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 132

Last 30 days Overall leaderboard