StarDirk
StarDirk

Reputation: 41

Listen to MS Teams Chat New Message

I'm trying to build a chatbot system which can interact with our organization's Microsoft Teams channel. The Chatbot will be deployed on GCP VM. I was wondering how to listen to new messages from Microsoft Teams so that the chatbot can reply Teams user correspondingly in real time. I know we can use Graph API to get messages from Teams but it doesn't seem realistic to send API request every second to get messages from all Teams users. Is there any other approach? (We cannot use Azure Bot Service in our organization)

Upvotes: 3

Views: 1305

Answers (1)

ChetanSharma-msft
ChetanSharma-msft

Reputation: 863

You can Subscribe to chat message and once the message is sent, it will automatically notify to the configured endpoint. Reference doc: https://learn.microsoft.com/en-us/graph/api/subscription-post-subscriptions?view=graph-rest-1.0&tabs=http

Upvotes: 2

Related Questions