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 / Trigger a flow from a ...
Power Automate
Answered

Trigger a flow from a date within a SharePoint list

(0) ShareShare
ReportReport
Posted on by 38

Hi all,

I'm very new to Power Automate but my company would like to make more use of it and asked me to try something.

 

I have a SharePoint list of our clients and when their contracts expire with us. I'm trying to put together a flow that will create a Planner Task 30 days before that client's contract expires.

 

This is what I have so far:

 

pa.JPG

 

The weird part is my flow's history says it's running successfully, but no Planner Task gets created. I have a feeling I'm doing something wrong with the addDays functions, but if it's something else please let me know!

 

 

Categories:
I have the same question (0)
  • Verified answer
    v-LilyW-msft Profile Picture
    Microsoft Employee on at

    Hi @clsmooth 

    Please change the formula to addDays(utcNow(),30,'yyyy-MM-dd').

    Because the date in Sharepoint is displayed in Flow with ‘yyyy-MM-dd’ format, so need to set the date format to the same and then compare.Otherwise your Condition result will always be false. 

    vLilyWmsft_0-1630027134582.png

    You can use Compose action to check their output.

    vLilyWmsft_2-1630027790742.png

    vLilyWmsft_3-1630027840332.png

    Hope the content above may help you.

    Best Regards

    If my solution helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • clsmooth Profile Picture
    38 on at

    Hi @v-LilyW-msft ,

     

    Thanks for your update, I gave your tips a try.

     

    I first updated the function with addDays(utcNow(),30,'yyyy-MM-dd').   Getting successful runs still, but still no Planner Task.

     

    I also added your 2 Compose steps and when I go back to check them, I'm getting slightly different results then you are:
    output.jpgI also noticed the date format in our SharePoint list appears as such ('Date and Time' attribute column in SharePoint).

    date.JPGI'm wondering if the MM portion of how the date format is causing a problem?  Single digit months don't have a 0 in front of them.

    I tried editing the way the date is formatted to try and matching what's in SharePoint. 

     

     

    I've attempted:

    addDays(utcNow(),30,'MM-dd-yyyy')
    addDays(utcNow(),30,'MM-DD-YYYY')
    addDays(utcNow(),30,'mm-dd-yyyy')
    addDays(utcNow(),30,'MM/DD/YYYY')
    addDays(utcNow(),30,'mm/dd/yyyy')

     

    Still getting successful runs, still no Planner Task.  What format should I use to match what's in the SharePoint list?  Should I change the column's attribute in the list?

     

    Thanks again!

     

  • v-LilyW-msft Profile Picture
    Microsoft Employee on at

    Hi @clsmooth 

    The date in Sharepoint is automatically displayed in Flow with "yyyy-MM-dd" format.

    Please make sure in your date column have a date equal to the current date plus 30 days.

    I test on my side, if there is 9/29/2021 in my date column, a new task will be created.(My current date is 8/30/2021 )

    This is my test list

    vLilyWmsft_1-1630285891607.png

    Flow in details:

    vLilyWmsft_2-1630285942370.png

    vLilyWmsft_3-1630285970525.png

    After Flow runs, a new task will be created.

    vLilyWmsft_5-1630286255434.png

    Best Regards.

  • clsmooth Profile Picture
    38 on at

    Hi @v-LilyW-msft ,

     

    Your previous suggested steps actually did work!  The issue was none of our clients on our list happened to be within 30 days of their contract expiring 😛 I created a test/dummy client, adjusted its expiry date to be 30 days from now and Planner Task was created!

     

    Thanks again for all your help

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 March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 605

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard