Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Quote of the day List post to Teams

(0) ShareShare
ReportReport
Posted on by 19

Hi power automate community, can you tell me if its possible to post a message in Teams from an MS List when the date is equal to today? 

  • David_MA Profile Picture
    11,744 Super User 2025 Season 1 on at
    Re: Quote of the day List post to Teams

    Sure, the expressions are as follows. Compose Today, which returns the current date (e.g., Tuesday, October 24, 2023), which is used in the compose message action and could have easily been placed there instead. I like using the compose actions because when you look at the workflow history it makes it easy to see the values.

    formatDateTime(utcNow(),'D')

    Count quotes, which finds out how many rows are returned from the List rows in a spreadsheet action:

    length(outputs('List_rows_present_in_a_table')?['body/value'])

    And the random number expression is:

    rand(2,outputs('Count_Quotes'))

    The first number is 2 because you don't want to return the header row. The second value is the output of the prior expression to count how many rows were returned. So, if there are 366 rows in the spreadsheet, it would return 366 and would generate a random number between 2 and 366.

     

    This has been working well since I created. I added a few more quotes a couple of weeks ago and several months ago I changed the format of the adaptive card that is posted so the quote comes before the weather.

    Screenshot 2023-10-24 152628.jpg

     

  • JMBARNES Profile Picture
    30 on at
    Re: Quote of the day List post to Teams

    I might be over 12 months late to the party; but could I see your method for "Compose Today", "Count Quotes" & "Compose Random number"?

    Thanks

  • ScottRTC Profile Picture
    19 on at
    Re: Quote of the day List post to Teams

    Thank you for your help @ScottShearer - the daily quotes are now posting to our Teams channel and receiving  thumbs up from colleagues! 

     

  • Verified answer
    ScottShearer Profile Picture
    25,228 Most Valuable Professional on at
    Re: Quote of the day List post to Teams

    @ScottRTC 

    My apologies... I didn't think it through before my last response.

    First, you should be using a query filter in you get items action.  See my Get items action above and substitute

    field_0 for Date in the query.  That will make it so that only items that should be posted to Teams today are returned.

    I suspect that you already have the filter because only 1 item was returned.

    Because the results for SharePoint are already filtered, you don't need a condition.  So, remove the condition in your loop and just have the Teams Post a message action.

    Please let me know how it goes.

     

     

     

  • ScottRTC Profile Picture
    19 on at
    Re: Quote of the day List post to Teams

    @ScottShearer 

    The formatDateTime expression is - formatDateTime(utcNow(),'yyyy-MM-dd'

    ScottRTC_0-1667839748453.png

    The list display name is 'Date', the internal name is 'field_0'

    If I hover the pointer over 'date' I get - items('Apply_to_each')?['field_0'] 

    If I hover the pointer over 'value' I get - outputs('Get_items')?['body/value'] 

    ScottRTC_1-1667840011556.jpeg

     

  • ScottShearer Profile Picture
    25,228 Most Valuable Professional on at
    Re: Quote of the day List post to Teams

    @David_MA 

    Please post a screen shot of your formatDateTime() expression in your condition.

    If should look like this: formatDateTime(utcNow(),'yyyy-MM-dd')

    Also, is Date the name of the column in your list which contains the date the item should b posted in Teams?

     

     

     

  • ScottRTC Profile Picture
    19 on at
    Re: Quote of the day List post to Teams

    @ScottShearer 

    My flow now runs but I don't get the post into Teams, any suggestions? 

    The output from the 'Get Items' line is correct 

    ScottRTC_0-1667813699886.jpeg

     

    ScottRTC_1-1667813763205.jpeg

     

     

  • ScottRTC Profile Picture
    19 on at
    Re: Quote of the day List post to Teams

    I appreciate your help @ScottShearer 🙂 

    Can you help me replicate the next step in your flow?

    ScottRTC_0-1667727639580.png

     

     

     

  • Verified answer
    ScottShearer Profile Picture
    25,228 Most Valuable Professional on at
    Re: Quote of the day List post to Teams

    @ScottRTC 

    Your filter query should look almost exactly like the screen shot below.  This will limit the items returned to those where your date column is today and the Recurrence trigger will run the Flow once a day. 

    Substitute the internal name of your date to publish column for Date.  The internal name of the column may/may not be the same as the name you see (the display name).  Internal names cannot have spaces.  One way to verify the internal name of the column is to go to the list settings and click on the column name.  The internal name will be at the end of the URL after field=

    Give it a try!

    image.png

     

  • ScottRTC Profile Picture
    19 on at
    Re: Quote of the day List post to Teams

    Hi @ScottShearer thanks for the help!  

    Yes I have only 1 quote per day in the list. 

    can you tell me a more about the 'Filter Query' step? 

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

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!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1