Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Post a message to Teams when a new item is added to a Sharepoint List With Conditions

(1) ShareShare
ReportReport
Posted on by 50

I have a flow that starts with When an item is created in a Sharepoint list, then I have Post a Message in a Teams chat or channel. I want to add a condition that the Teams message is only sent when the "Location" column contains one of several different values. I added the condition, but it is not sending the message in Teams anymore. What am I doing wrong?

BelindaH_0-1719854928232.png

 

  • CU05082214-0 Profile Picture
    50 on at
    Re: Post a message to Teams when a new item is added to a Sharepoint List With Conditions

    Thanks. I was able to get it to work this way.

    BelindaH_0-1720461081795.png

     

  • v-yetonggu-msft Profile Picture
    on at
    Re: Post a message to Teams when a new item is added to a Sharepoint List With Conditions

    Hi @BelindaH ,

    Please check this test:

    SharePoint List:

    vyetonggumsft_3-1719978703737.png

    Flow Preview:

    vyetonggumsft_0-1719978237560.png

    Flow Configuration:

    vyetonggumsft_1-1719978400610.png

    @Or(contains(if(empty(item()?['Location/Value']),'',item()?['Location/Value']), 'DFW'),contains(if(empty(item()?['Location/Value']),'',item()?['Location/Value']), 'IOC'),contains(if(empty(item()?['Location/Value']),'',item()?['Location/Value']), 'TOL'),contains(if(empty(item()?['Location/Value']),'',item()?['Location/Value']), 'ORD'),contains(if(empty(item()?['Location/Value']),'',item()?['Location/Value']), 'DFW-HGR'))
    length(body('Filter_array'))

    vyetonggumsft_2-1719978577296.png

    item()?['CompanyNumber']
    item()?['FinalMeetingDate']
    item()?['MeetingFrequency/Value']

    The Result:

     

    vyetonggumsft_4-1719978728927.png

    Best Regards,

    Sunshine Gu

  • Verified answer
    CU05082214-0 Profile Picture
    50 on at
    Re: Post a message to Teams when a new item is added to a Sharepoint List With Conditions

    Unfortunately, it did not work for me. Any time I add conditions to a flow, the flow will not work for some reason. I wanted to filter the items to only receive the Teams message for the above locations, but I finally just set the flow to send the message for all newly created items in the SharePoint list.

  • CU05082214-0 Profile Picture
    50 on at
    Re: Post a message to Teams when a new item is added to a Sharepoint List With Conditions

    Thank you! I will test first thing tomorrow 

  • v-yetonggu-msft Profile Picture
    on at
    Re: Post a message to Teams when a new item is added to a Sharepoint List With Conditions

    Hi @BelindaH ,

    Please check this test:

    Flow Preview:

    vyetonggumsft_2-1719890813197.png

    Flow Configuration:

    vyetonggumsft_1-1719890786032.png

    Best Regards,

    Sunshine Gu

  • CU05082214-0 Profile Picture
    50 on at
    Re: Post a message to Teams when a new item is added to a Sharepoint List With Conditions

    No, it is a single choice column.

  • v-yetonggu-msft Profile Picture
    on at
    Re: Post a message to Teams when a new item is added to a Sharepoint List With Conditions

    Hi @BelindaH ,

    Is your location column a multiple-choice column?

    Best Regards,

    Sunshine Gu

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May 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 >