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 / Reply to ms teams mess...
Power Automate
Answered

Reply to ms teams message only if message is not posted by bot

(0) ShareShare
ReportReport
Posted on by 9

I setup a workflow which sends a reply if a keyword "help" is posted. However, the reply itself also contains the word "help" which then triggers and endless loop of bot messages

 

I thought to add a contrition which checks whether the message is posted by a normal user (then reply) or by a bot (don't reply), however I can't find to set such a condition

papanito_0-1700224066384.png

 

Categories:
I have the same question (0)
  • Matthy79 Profile Picture
    4,188 Super User 2024 Season 1 on at

    You could add it to the trigger condition.

  • Verified answer
    michael0808 Profile Picture
    304 on at

    You will first need to find the ID of the bot, then add the following to your trigger condition:

     

    @not(equals(triggerOutputs()?['initiator']?['user']?['id'], '213f53bf-7e17-486f-b792-c410b4e10cc9'))

     

    michael0808_0-1700226385005.png

    michael0808_2-1700226571429.png

     

    michael0808_1-1700226418328.png


    You can find the ID of the bot by having the trigger execute on a bots response at least once, and go into the output of the trigger to find the initaitor ID.

     

    Hope this helps!

     

  • papanito Profile Picture
    9 on at


    Thanks for your help, not sure how to do that - I am very very new to the PowerBI stuff. I can see the workflow runs and see the input and output of each run, but somehow I don't see the ID of the "Flow bot"

     

    papanito_0-1700230697288.png

     

  • michael0808 Profile Picture
    304 on at

    Run the flow once without any checks. Check the output of the trigger and look for this section:

    michael0808_0-1700231304642.png

    That ID should be the ID of your workflows bot. 


    I hope this helps.

  • papanito Profile Picture
    9 on at

    Ok I guess I found it, using the webapp and navigating to the Workflow "user" where I can find a "slug" in the URL. However, I see that when I write a message, the workflow runs trough, when I then do a reply it fails

    papanito_0-1700231859974.png

     

    Request to the Bot framework failed with error: '{"error":{"code":"ServiceError","message":"Unknown"}}'.

    papanito_1-1700231967029.png

     

  • michael0808 Profile Picture
    304 on at

    I guess I am too lazy to go through all that work. You taught me something as well 🙂 

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!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 262 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 227

#3
Expiscornovus Profile Picture

Expiscornovus 225 Most Valuable Professional

Last 30 days Overall leaderboard