Creating Webhooks Programmatically?

Tony Lockhart 46 Reputation points
2022-03-01T16:24:06.893+00:00

I just completed the outgoing and incoming Webhooks tutorial at link. Both of these processes work well in theory. However, I am attempting to integrate the chat feature of Microsoft Teams into an issue tracking application. In this case, each issue will have a unique channel, created when a ticket is submitted. Any correspondence will be created as messages in the issue's channel. Following this method, the application will need to send any messages to the incoming and outgoing webhook, to trigger an event to retrieve any new messages when the outgoing webhook identifies new messages from channel members. In the tutorials, the outgoing/incoming webhooks were created manually. This process would not scale with an infinite number of channels. Is there a way to programmatically create webhooks, once a channel is created? If so, is there any documentation (nodejs samples) on this?

Microsoft Security | Microsoft Graph
{count} votes

Accepted answer
  1. CarlZhao-MSFT 46,376 Reputation points
    2022-03-03T02:10:00.453+00:00

    Hi @Tony Lockhart

    Reference: create Microsoft Graph webhook subscriptions for a Node.js app, so that it can receive notifications of changes in a user’s Microsoft account data. https://github.com/microsoftgraph/nodejs-webhooks-sample


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.