MS Teams connector middle layer between Payload sender and Receiver (msteams channel)

Brass Contributor

Hello Support


I have created one custom connector (using MS Javascript SDK). This connector will give me one Incoming Webhook URL. And I've configured the Incoming URL to my external server. Now Server has start sending events to my Channel. This flow working fine. The server sends events to MS Teams Channel and Channel display the Message card (payload).

Here I need control in code. I need to modify the Payload (Message card) sent by the server. So

When Server sends the Message to Channel It should come to my C# application and I want to change the payload based on some condition and then the reply back to the channel.

In Conclusion, I need the Middle layer in between payload sender and receiver in the connector flow. 


One similar conversaion link I found : 

Ref link for Custom Connector:

6 Replies

@NadirRiyani - Could you please take a look at Change Notification Subscription. Please take a look at Change notifications for Microsoft Teams messages blog. 


Let me know if that helps.

@Wajeed-MSFT Thanks for your quick response.

It does not look direct solution to the issue which I have posted. It looks like the subscription-based model. Do you know any NuGet package or Any direct Event available whereas the developer take some action before message post to Teams via Connector.? Similar like one every Bot command and OnTurnAsync event raised.

And It looks API is in the Beta version too.

@NadirRiyani - In that case, you could create an Azure Function which receives the data first and then posts to respective Incoming Webhook. 
See if this example helps:

@Wajeed-MSFT : That I understand. but it seems there would more data traversing and difficult to manage in case of any exception or any issue.  Is there any event directly available in the Bot framework. Like OnTurnAsyncOnTeamsMembersAddedAsync. So there would be direct action when the message gets in into the connector.


Currently, this is not available as part of Bot Events.

@Wajeed-MSFT : Thank you for your valuable and quick support.