Hoop can integrate with Microsoft Teams sending messages to a channel when a particular event happens.
This feature is available in version 1.17.20+
- First, obtain the incoming webhook url. Refer to this section of the Microsoft Teams article.
- Login to your hoop instance and create a plugin that allows having access to the webhook dashboard.
hoop login hoop admin create plugin webhooks --overwrite
For self-hosted deployments, you will need the API key of the webhook provider and set the environment variable
WEBHOOK_APPKEY when starting the gateway. Please reach out to our support team to obtain one for your instance.
Access the webhook provider dashboard
hoop admin webhooks-dashboard
Create an Endpoint
Create an endpoint by adding the URL obtained when creating an incoming webhook in the previous step. And select the events that you wish to send.
In the advanced section, make sure to enable endpoint rate limit and set it to 4 (per second). This will respect the limitations enforced by the Microsoft Teams service.
Send a Test Event
Go to the Testing tab, select the available event, and click on the Send Example button. This event should be received in the configured Teams channel.
In the "Overview" tab, the test with the sent event will be displayed.
Now you can define which connections will send this event based on the plugin configuration. Update or add a new connection to enable this plugin.
hoop admin create conn bash -a <agent-name> --overwrite \ --plugin webhooks \ --plugin review:admin -- bash
hoop admin create plugin review
Interacting with the connection via the webapp or the CLI will trigger an alert indicating that the connection needs to be reviewed. A message will be sent to the Microsoft Teams channel.
hoop exec bash -i 'ls -l'