web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : tLC0nUeqkV3xLzVY6w24z8
Power Automate - Building Flows
Answered

Trigger a flow from a date within a SharePoint list

Like (0) ShareShare
ReportReport
Posted on 26 Aug 2021 19:13:50 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!

 

 

  • clsmooth Profile Picture
    38 on 30 Aug 2021 at 18:27:24
    Re: Trigger a flow from a date within a SharePoint list

    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

  • v-LilyW-msft Profile Picture
    on 30 Aug 2021 at 01:28:58
    Re: Trigger a flow from a date within a SharePoint list

    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 27 Aug 2021 at 19:06:04
    Re: Trigger a flow from a date within a SharePoint list

    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!

     

  • Verified answer
    v-LilyW-msft Profile Picture
    on 27 Aug 2021 at 01:32:02
    Re: Trigger a flow from a date within a SharePoint list

    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.

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2