How to send notifications to Microsoft Teams using Teams Bot

Starting from version 5.7, it's possible to send notifications from EasyMorph to Microsoft Teams using EasyMorph Bot for Teams (or a custom Teams bot).

The bot can only send messages to the specified channel. It can't receive and process replies. It's a one-way communication.

Here is how it works:

Step 1: Add EasyMorph Bot to your Teams channel

  1. Go to the "Apps" tab in Teams
  2. Find "EasyMorph Bot".
  3. Add to your team
  4. Select a channel in your team.

Step 2: Create a Teams Bot connector in EasyMorph

Open the Connector Manager in EasyMorph and create a new Teams Bot connector:

image

Step 3: Add the "Teams Bot" action to your workflow

Press "Add action" on the toolbar and add the "Teams Bot" action to your workflow. You can drag the action from the sidebar right onto a table in your workflow.

Step 4: Configure the "Teams Bot" action

Click the action in the table to select it. In the action settings:

  1. Choose the connector that you configured in step 2 above
  2. Pick the Teams channel in which you added EasyMorph Bot in step 1 above. You will be prompted to sign into your Microsoft account - go ahead and authorize.
  3. Write a message to send. There are two supported message formats:
    • Plain text messages
    • Adaptive cards

Plain text messages have no formatting. You can insert EasyMorph parameters in curly braces right in the text.

image

Adaptive cards allow creating complex messages with formatted text, images, buttons, hyperlinks, lists, etc. Adaptive cards must be specified as JSON. Optionally, you can insert EasyMorph parameters right into the JSON.

Here is an example of an adaptive card.

{
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "TextBlock",
            "text": "Here is a ninja cat"
        },
        {
            "type": "Image",
            "url": "http://adaptivecards.io/content/cats/1.png"
        }
    ]
}
2 Likes

Examples of notifications that you can send to Teams:

  • Daily business metrics (such as revenue)
  • Automated alerts about incidents and KPIs getting below/above a threshold
  • Notifications about finished workflows
  • Warnings about data inconsistency detected in databases and applications
  • Notifications about events in other systems (that can't send notifications to Teams directly)

The last point above can be unexpected. Basically, other applications can use EasyMorph as a proxy to send real-time notifications to Teams as long as they can do one of the following:

  • Run commands from the command line, so that they can use ems-cmd to trigger Server tasks or use CLW run EasyMorph workflows.
  • Send HTTP requests, so that they can send HTTP requests to a custom API endpoint of EasyMorph Server or a webhook on the EasyMorph Gateway

The bot is still undergoing verification by Microsoft. We needed this article for the verification process. It may take another week or so. I'll post when it's ready.

1 Like

EasyMorph Bot has passed the verification and is now available in Microsoft Teams.

Go ahead and try it :slight_smile:

1 Like

For now, the Teams Bot can only perform one-way communication, i.e. notifications.

However, we can add the ability to receive replies and form submissions (like below) to the bot, if such a feature is actually needed. The responses/submissions would arrive through EasyMorph Gateway.

image

If that sounds interesting, please post your feature requests here or in #feature-requests.

Hello Dmitry,

I would like to use this feature for collecting input from a team (or different teams).

Example:
We want to organize a BBQ and we would like to know who is bringing what. I guess we could do something like that with that feature.

Generally spoken, I think this could be a very handy option to get a feedback at different cases.

So, for me it sounds interesting and I would liek to have the option.

Regards,
Jochen

If the team has access to EasyMorph Server (via a browser), you can simply send them a link to a task, and prompt for one or more parameters in that task to collect responses.

Would that work for you?

I will try as soon as our organization officially allows the usage of Easymorph bot, which is hopefully by the end of this month.
I‘ll keep you informed.