Mar 26 2020 05:37 AM
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 : https://github.com/microsoft/botframework-sdk/issues/5387
Ref link for Custom Connector:
Mar 26 2020 11:48 PM
@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.
Mar 27 2020 02:34 AM
@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.
Mar 27 2020 02:50 AM
@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: https://visualstudiomagazine.com/articles/2017/04/01/implementing-webhooks-azure-functions.aspx
Mar 28 2020 10:51 PM
@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 OnTurnAsync, OnTeamsMembersAddedAsync. So there would be direct action when the message gets in into the connector.
Mar 28 2020 10:56 PM
Mar 29 2020 11:53 PM
@Wajeed-MSFT : Thank you for your valuable and quick support.