How to capture reaction of an emoji to a message in Microsoft Team

Is there a way to capture the reaction/emojies on messages in Microsoft Teams using Microsoft Teams webhook (I’m coding in python)? If not can I do this using other tools ( Microsoft Graph, Power Apps, Power Automate, etc.).

I am using Microsoft Team Webhook to post message into Teams Channel, now I am trying to capture user reactions to each message and saved them in a database. Is there a way to get access to reactions? It would be great if I can do it by using current Webhook that I have.

Here is the function I am using to post the message to Microsoft Teams.

def sendMessageToTeams(webHookUrl: str,msg: str):
    try:
        # escaping underscores to avoid alerts in italics.
        msg = msg.replace('_', '_')
        teams_msg = pymsteams.connectorcard(webHookUrl)
        teams_msg.text(f'{msg}')
        teams_msg.send()
    except Exception as e:
        print(f'failed to send alert: {str(e)}')

Source: Python Questions

LEAVE A COMMENT