DEV Community

Cover image for Slack Bot for Support Personnel build with API Led Connectivity
vigneshwaran kumaravel
vigneshwaran kumaravel

Posted on

Slack Bot for Support Personnel build with API Led Connectivity

Overview

This integrates slack and mule integrations to assist for support tasks such as pinging the mule server host in case of server downtime and do basic operations(start, stop, update, restart) with help of cloudhub api.

Functional Overview

Alt Text

Downloadable Asset

  1. Slack Experience API RAML
  2. Support Operations API RAML
  3. Ping API RAML
  4. Cloudhub Operations API RAML

Github Repository

Operations Supported:

  • Ping host inside mule server host to check its connectivity with help of java class.
  • Start, Stop, Update, Restart cloudhub applications in bulk using Cloudhub API.

API Led Design

Alt Text

Slack

Slack is basically a messaging app meant for teams and workplaces can be used across multiple devices and platforms, and is equipped with robust features that allow you to not only chat one-on-one with associates but also in groups.

Slash Commmands

Slash Commands allow users to invoke your app by typing a string into the message composer box.

A submitted Slash Command will cause a payload of data to be sent from Slack to the associated app. The app can then respond in whatever way it wants using the context provided by that payload.

Slash-Command-Documentation

With the help of slash commands, we can invoke external URLs. Using this concept we are interacting with mule API to perform operations such as pinging server inside mule runtime, starting, stopping, restarting, and updating mule applications in bulk from the slack channel itself.

Steps to integrate slack with mule API:

1.Install slash command application to your slack.
Alt Text
2.Configure custom slash commands required for example since we want to ping the mule application inside the mule server let's create a slash command /ping which triggered from the slack channel will call the configured mule API URL.
Alt Text

Use Cases:

1.Support Personnel often faced with issues like server downtime and emergency network issue during those times we currently use net-tools API to check if our client-server is reachable over mule runtime.
Alt Text
With the help of slack integration, we can ping the host from the slack channel itself to get ping statistics.
Alt Text
Alt Text
2.When server downtime happens we are required to stop several applications and start them again after maintenance which needs to be done for several applications. Currently, we use the Runtime Manager to do these activities.
Alt Text
With the help of slack integration, we can do this from the slack channel in bulk.
Alt Text

Top comments (1)

Collapse
 
roystonlobo profile image
Royston Lobo

Thanks for your submission @vigvel123 !