IBM / zOS-Client-Web-Enablement-Toolkit

Apache License 2.0
38 stars 15 forks source link

Feature Request #29

Closed sunil390 closed 3 years ago

sunil390 commented 3 years ago

Is there a plan to develop an example to post a message to Microsoft Teams Channel using webhook like the Slack example?

gorelikg commented 3 years ago

Hi Sunil, I'm not aware of any plans for a similar example targeting Microsoft Teams Channel.

Hi Ian, (@ian-burnett ) Any chance you have something you're working on that would satisfy that request?

ian-burnett commented 3 years ago

I don't have access to a Microsoft Teams environment that will allow me to develop a sample.

Reading the Microsoft Teams documentation, however, gets me to the following pages: Post external requests to Teams with incoming webhooks and Setting up a custom incoming webhook.

It appears that messages can be posted to Teams using a standard HTTP POST operation - this is the same mechanism used by the Slack web API as demonstrated in the sample.

It should be a reasonably straightforward exercise to start from the Slack sample, change the URL, the message body, and import the correct SSL certificates into the SAF keyring / key database file.

Once you have a basic hello world working, then the documentation suggests that it's simply a matter of changing the HTTP POST payload to achieve various card functions.

If someone knows how I can get hold of a zero-cost Teams environment that will allow incoming webhooks, then I'm certainly open to putting together a sample.

sunil390 commented 3 years ago

Thank You! Galina and Ian, I could make progress in connecting to teams. Will post the details here this weekend.

blairwyman commented 3 years ago

Sunil, so glad you could make progress. Did you have good luck?

sunil390 commented 3 years ago

zAlert.zip Greetings Blair, I made very little changes to Ian's code as attached and it worked.

sunil390 commented 3 years ago

MS Teams Integration worked as per Ian's suggestion. This request can be closed.

ian-burnett commented 3 years ago

Thanks for the update @sunil390 - very useful.