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 / Message teams based sh...
Power Automate
Answered

Message teams based sharepoint column date

(0) ShareShare
ReportReport
Posted on by

I have a flow that isn’t working as expected. Essentially, I want to trigger an alert 120 days before a specified date based on a column in SharePoint called ‘DataFim.’ If there’s an item in the list with the same date, I want to send a message via Teams.

Compose: formatDateTime(addDays(utcNow(), 120), 'yyyy-MM-dd')

expression condition: formatDateTime(items('Apply_to_each')?['Datafim'],'yyyy-MM-dd')


Sem título2.png
Sem título.png
Categories:
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @xFelipeDuartee ,

    Please add a compose and input the 'formatDateTime(items('Apply_to_each')?['Datafim'],'yyyy-MM-dd')' expression in compose.

    Then run flow,check the compose outputs.

     

    Best Regards,

    Sunshine Gu

     

     

  • xFelipeDuartee Profile Picture
    on at

    I did it this way, is it correct?

     

     

    Sem título.png
  • v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @xFelipeDuartee ,

    That's right, I want to know what the output of compose is after you run flow.

     

    Best Regards,

    Sunshine Gu

  • xFelipeDuartee Profile Picture
    on at

    Erro detais: Unable to process template language expressions in action 'Compose_2' inputs at line '0' and column '0': 'The template language function 'formatDateTime' expects its first parameter to be of type string. The provided value is of type 'Null'. Please see https://aka.ms/logicexpressions#formatdatetime for usage details.'.
    @v-yetonggu-msft 

    Sem título.png
  • xFelipeDuartee Profile Picture
    on at

    There are some values ​​that are empty in this column, could this be the problem?

    If so, could you make a filter? @v-yetonggu-msft 

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

    Hi @xFelipeDuartee ,

    Please try this expression:

    if(empty(items('Apply_to_each')?['Datafim']),'',formatDateTime(items('Apply_to_each')?['Datafim'],'yyyy-MM-dd'))

    Best Regards,

    Sunshine Gu

  • xFelipeDuartee Profile Picture
    on at

    not working 😞 


    image.png
  • Verified answer
    v-yetonggu-msft Profile Picture
    Microsoft Employee on at

    Hi @xFelipeDuartee ,

    I know what the problem is, Get items gets 100 records by default, so it only loops 100 times, I suggest you check in the settings of Get items and increase the pagination threshold to 5000.

    vyetonggumsft_0-1718677722138.png

    vyetonggumsft_1-1718677761535.png

    Best Regards,

    Sunshine Gu

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

    Hi @xFelipeDuartee ,

    Do you want to run a flow once a day or every minute?

     

    Best Regards,

    Sunshine Gu

  • xFelipeDuartee Profile Picture
    on at

    Indeed, the issue was due to the ‘get items’ configuration @v-yetonggu-msft 

    Thanks support! @v-yetonggu-msft 

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

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 299

#2
11manish Profile Picture

11manish 274 Super User 2026 Season 2

#3
Henil Profile Picture

Henil 119

Last 30 days Overall leaderboard