简体   繁体   中英

Microsoft Teams - Power Automate - Bot replies to older messages

I'm having a problem with a bot that has to reply automatically when a message is posted in a Teams channel. When it is activated, it also responds to messages that were posted prior to its activation. How can i avoid this?

Thanks for your help

I'm assuming you're running a flow with a Microsoft Teams trigger.

I can see two possible causes of this.

This first is that Microsoft's Team trigger doesn't work very well and is firing for previous posts while the Flow is disabled. Very plausible

If that's the case you need to make a Condition to check if the post date is greater than the current time minus say 10 minutes, AddMins(UtcNow(),-10) . If successful, continue, if not, terminate.

Hopefully, you can pull the post date directly from the Teams trigger, but if not you'll have to use a Teams action to look up information about the given post id provided by the trigger.

The second possibility is that you're not taking the ID from the trigger which will tell you what post to respond to, and accidentally doing some kind of reply to all posts in the channel.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM