Will the Microsoft-Teams bot get any event when bot is added by editing an existing message? - microsoft-teams

When a Microsoft-teams bot is added to an existing message on a channel, by editing the message, would it be possible to notify the bot about the message?
I tried this scenario and looks like bot is not receiving any events for such cases. Is there any interface or mechanism available to notify the bot about the message?

When you edit a Teams message and add any # mention - whether it's to a user or a bot - it doesn't generate new notifications. This has been a gap ever since we added the ability to edit messages.

Related

Power Automate editing posted teams message

I am using power automate to post a message to a teams channel. The message cannot be edited by admin of that teams channel or any user in that channel. I could not find an option to make the teams message editable or make it editable only by admin of that channel. Any pointer on making power automate teams message editable by admin of the group?
In general messages sent from one "user" (or bot) can't be edited by other users, even an admin - that would be a disaster for things like auditability. However, messages sent from a bot (e.g. the Flow bot) -can- be edited by the bot. However, in the case of Power Automate, it does not offer this as an action for the "post a teams channel message" Action, only for the Action that sends an Adaptive Card message. If you can change your flow to send this kind of message, there is an action to then update it later, using the message id.

Microsoft-teams bot notify editing the message

When a Microsoft-teams bot is added to an existing message on a channel, by editing the message, would it be possible to notify the bot about the message?
Bot doesn't get any activity when message is edited or updated.This is the intended behaviour of the bot

How to make Trigger Action by Reaction Posted on MS Teams

I am making bot works for Microsoft Teams.
Goal: To make bot to detect reaction posted for any messages in the user's MS teams channel.
Problems:
Using onReactionsAdded in activityhandler(MS BotFramework) , my bot detects the reaction posted only for the bot messages
Is there any possible way to make trigger action by posting reaction for users' posts in MS Teams?
This is similar to the fact that you Bot won't receive every single message posted in the channel / group chat - only those that "#mention" your bot. It's different in a 1-1 chat with the bot though - there it will receive everything. If you want to make sure you get every single reaction, you'd need to call the Graph for that. See Get a reply to a channel message as an example - right near the bottom of the page it shows "reactions" (it's empty in that example).
#Cambria a Bot receive's the reactionAdded event only when there is a reaction on a message the Bot itself posted. Reacting on a user's post does not trigger an event with the Bot.

How to get a welcome message on teams even before user sends any message

I have deployed my bot on teams channel.
I would like to send a welcome message to a new user even before user sends a message to the bot.
can we achieve this for teams channel?
If yes, which event can be used to get that user is accessing bot for the first time.
You can use the ConversationUpdate event ActivityTypes.ConversationUpdate // in c#
When a bot is installed, your bot receives a conversationUpdate event. You can then send a proactive message to the user. Could you please try sending a proactive message and let us know if you face any issues?
The conversationUpdate event with the membersAdded object in the payload is sent when either a bot is added to a team or a new user is added to a team where a bot has been added. It is always a good practice to send a welcome message introducing the bot to all the users. Ensure that your bot responds to the conversationUpdate message, with the teamsAddMembers eventType in the channelData object. Also, keep in mind that the memberAdded ID is the bot's App ID itself, because the same event is sent when a user is added to a team.
Hope this helps.

How do I receive only the messages that are direct messages to my bot user?

I have successfully setup my slack bot app, have enabled events etc. I want to receive any direct messages that the members of my slack team send to my bot. For this, I have only enabled Bot Events and No Team Events like below
However, I do not get any event on my webhook on this setting.
If I enable message.im event under Team Events, then I start getting events. But then, I get every message that the user (who has installed the app) sends to any other user in the team.
How do I get only the messages that are sent to my bot user?
Update 1
Based on this SO question I created a private channel with the bot user. Even then, the messages in the private channel do not arrive in my webhook with the above event subscriptions.
Update 2
After reinstalling the app, it seems to be working fine. I have only used it for few minutes after the reinstall so far. I will keep posting here how it goes. It would still be interesting to know what went wrong where.
It is normal behavior that your script receives all messages (for every channel your bot is a member of), not only the messages sent directly to your bot. At this time you can not filter further in the event configuration. So you need to filter out any unwanted message in your script handling the event.
See also this answer.

Resources