TeamsBot ChatOps

March 25, 2022
|
3
min read

Engineers across enterprises are already working with a variety of platforms and adding one more system to their stack isn’t the most efficient use of their time when it can be avoided. One of the common themes we see at RapDev when we’re consulting with customers is wanting to keep engineers out of ServiceNow as much as possible. This enables them to focus their time on producing deliverables instead of having to focus on using a new system. To help mitigate communication across platforms, including ServiceNow, RapDev engineers developed the Microsoft Teams ChatOps integration.

The integration allows the forwarding of change requests and incidents to Microsoft Teams users via channels. From the channel, users can interact with the modules simply by responding to a Teams Bot.

Example:

To implement this bot we had to combine 3 different systems: ServiceNow, Azure and AWS.

ServiceNow: 

RapDev created a custom application in ServiceNow to facilitate both the triggers to the other systems, but to also process the response from these systems. The triggers can be automatic based on certain criteria on the change request/incident or they can be manually sent via a UI Action.

AWS

Since this integration is used in multiple environments, we needed logic somewhere on how to forward the events to the correct environment. We found the best way to resolve this was by creating a Lambda function that would determine the correct destination through different parameters such as instance endpoint, and Microsoft Tenant ID. We triggered this Lambda by adding an API gateway as the entrypoint.

Azure

Then we created a Bot Service in Azure in order to make a corresponding Bot in Microsoft Teams. The corresponding app registration created is given permission to read/write certain information about the Teams environment. After, we appended the API Gateway endpoint from AWS as the messaging endpoint of the Azure Bot.

Finally, once all these systems are connected, users are able to seamlessly interact with these ServiceNow modules without sacrificing the convenience of Microsoft Teams.

All of these functions and values are completely customizable to a specific customer’s needs, to learn more about how to integrate the Microsoft Teams ChatOps or find the right custom solution, reach out to our team.

written by
Jeffrey Mu
Jeffrey Mu
Boston
Boston born and raised software developer with several years experience in progressive ServiceNow implementations. Cryptocurrency enthusiast on the side.
Back to main Blog