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 / Format Date Colour bas...
Power Automate
Unanswered

Format Date Colour based on Date Extract from SharePoint List sent via Email

(0) ShareShare
ReportReport
Posted on by 22

Hi All,

I have created a Flow that automatically retrieves data from a SharePoint list and sends out an email daily. I have filtered the Status column so only the "WIP" data is issued and i have also formatted the Status Colour based on Status. There is a column marked Estimated Completion Date which i would like to format based on how close to that date it is. For example, if the completion date is due tomorrow i would like the colour to be amber if its due more than two days away i would like it to be Green, if its overdue i would like the date format to be red.. Any ideas on how i can achieve this

Flow looks like :

GeorgeKh_0-1670233237732.png

 

Select Statement is as follows:

 

GeorgeKh_1-1670233397822.png

 

Currently email output is as follows:

GeorgeKh_2-1670233555529.png

 

Any help would be appreciated.

 

 

Categories:
I have the same question (0)
  • v-jefferni Profile Picture
    Microsoft Employee on at

    Hi @GeorgeKh ,

     

    Do you want to display the date in different colors, according to the interval between date and today, in the email?

     

    Based on your description, I have made a simple test for your reference.

     

    SharePoint list for test:

    vjefferni_0-1670315736684.jpeg

     

    One Solution is to append each line of the list to a string.

    In this way, we can set the line to different colors according to the date in each line.

    vjefferni_0-1670319070614.png

    vjefferni_1-1670319077697.png

    vjefferni_2-1670319092278.png

     

    Result:

    vjefferni_2-1670315736695.png

     

    Best regards,

  • rishabhkhanna1 Profile Picture
    56 on at

    You can use HTML Formatting in compose action based on relevant logic in order to implement this.

    Also, other than formatting based on logic for values specific to email, you can also perform column formatting by writing rules specific to that column in sharepoint list as well.

  • GeorgeKh Profile Picture
    22 on at

    Hi @rishabhkhanna1,

    Do you have an example of how i can do this?

    The formatting in the SharePoint list based on condition only works in the SP list and the formatting does not copy over to the table in the Email

  • GeorgeKh Profile Picture
    22 on at

    I have tried different logic within the Select statement as follows as a trial:

    if(equals(item()?['CommittedDateofResolution'],'2022-12-12'),'red','yellow')
     
    This logic works (was for testing only) however the output is the word "Yellow" as opposed to the color yellow. I would also like to know if there is logic for greater than or less than that i can use in this expression?
     
    GeorgeKh_1-1670452773008.png

     


     

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 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard