Alerts from MyCloudSpace into Microsoft Teams, Slack and More!

We released our MyCloudSpace Notifications engine earlier this year. In short it let's you subscribe to the alert stream coming from our platform. This could be anything from a virtual machine you have not backed up to a cloud connect running quota or a high cpu/memory alarm. Check them all out out by hitting the little bell icon next to your name when logged in.

Most users subscribe to this via using Email alerts but I personally prefer the Webhook alerting. This let's you push messages to any system capable, such as Microsoft Teams, Slack or even your internal service desk platform.

I will run through in this demo how to send alerts to a specific Microsoft Teams channel.

Find the Team and next to the name hit the ... and select connectors

Now you can select Configure next to Incoming Webhook

Give it a name and then copy the URL it generates. This is unique to this channel and should be kept private as anyone with the URL can post data into the channel.

Now jump over to MyCloudSpace, hit the bell icon and this opens up your notification preferences, out to the right is a place for you to put this URL and the payload.

You can customise this as you need but below is a sample to get you started. Enter this payload and your URL into MyCloudSpace. (further down the page is a slack example)

Note that there are placeholders in here like [TITLE], these are replaced with data from the event. There is a full list of available placeholders below the payload box on the notifications page in MyCloudSpace.
{
	"@type": "MessageCard",
	"@context": "https://schema.org/extensions",
	"summary": "[TITLE]",
	"themeColor": "0078D7",
	"sections": [
		{
			"activityImage": "https://vbridge.mycloudspace.co.nz/content/mycloudspace.png",
			"activityTitle": "[TITLE]",
			"activitySubtitle": "MyCloudSpace",
			"facts": [
				{
					"name": "Triggered:",
					"value": "[TRIGGERED]"
				},
				{
					"name": "Object:",
					"value": "[OBJECTNAME]"
				},
                {
                    "name": "Client:",
                    "value": "[CLIENTNAME]"
                }
			],
			"text": "[BODY]"
		}
	]
}
Enter the payload (the the URL), you can customise this as required if you want more/less detail.

Enable the webhooks on the alerts you want to subscribe - you may not want all of these so select to meet your requirements.

Now that you have entered in the payload + webhook url and selected the alerts you want to subscribe to via webhooks you can click the save button at the bottom of the page.

That's it! Next time an alert of these types are triggered it will be sent to that url with that payload and MyCloudSpace will inject in the relevant information into the placeholders.

Here is a quota utilisation example posted to Teams for a Cloud Connect to see what you will end up with.

Prefer Slack? (me too... just dont tell the boss)

Add an incoming webhook to your channel and copy that URL

Then you can use this sample payload or build your own and put the placeholders in.

{
    "attachments": [
        {
            "fallback": "[TITLE]",
            "color": "#36a64f",
            
            "title": "[TITLE]",
            "text": "[BODY]",
            "fields": [
               
				{
                    "title": "Triggered",
                    "value": "[TRIGGERED]",
                    "short": false
                },
				 {
                    "title": "Object",
                    "value": "[OBJECTNAME]",
                    "short": false
                },
				{
                    "title": "Client",
                    "value": "[CLIENTNAME]",
                    "short": false
                }
            ],
            "footer": "MyCloudSpace",
            "footer_icon": "https://vbridge.mycloudspace.co.nz/content/mycloudspace.png"
        }
    ]
}

Will get you something like this