Skip to content

Teams Actions

Teams Actions allow you to interact with Microsoft Teams messaging.

Actions

teams.send_message

Send message to a specific Teams channel

Parameters:

webhook - URL of the channel webhook, as given in Microsoft Teams.

message - Message to be sent on channel

Returns:

This action has no returns

Exceptions:

NotificationFailed - Returns the error if message could not be delivered on channel webhook

Usage Example
script.mvn
teams.send_message(
    "https://some-company.webhook.office.com/webhookb2/189521ad-5f5a-4ead-b7ca-0768f00d6449@efff3709-d35b-4664-911e-1ddc0ed3e181/IncomingWebhook/1e82da5cbc8b42159817aaff70fa4f59/a9df8a09-0537-463d-ad989f9-520a9890f11d",
    "This is a test message"
)

Creating a Webhook

To interact with Teams, first of all, it is necessary to create a webhook on your channel, to integrate with Marvin.

Configure Channel

Go to your Teams "Team" tab and click on ... on the channel you want to add webhook then Connectors Channel Settings

Add Incomming Webhook

At connector list, select Incoming Webhook connector and click Configure Channel Settings

Configure Incoming Webhook

Now you can configure your webhook with a Name and Avatar image. After that click on Create button Channel Settings

Webhook created

Now your webhook is done, copy the URL returned, this is the value you will pass as webhook parameter Channel Settings