# How to send notifications to Microsoft Teams

**URL:** <https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams/2637>\
**Category:** Articles\
**Created:** [April 12, 2021, 11:08am UTC](https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams/2637 "2021-04-12T11:08:54Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [April 12, 2021, 11:08am UTC](https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams/2637/1 "2021-04-12T11:08:54Z")

</div>

Sending highly formatted notifications from [EasyMorph](https://easymorph.com) to a Microsoft Teams channel is relatively easy once you learn how to send web requests in EasyMorph. After reading this article you will be able to send notifications that look as below:

 ![image](https://community.easymorph.com/uploads/default/original/2X/c/cffd4b2abc479ef60e42ff524af2b50a8ca9b4a1.png)

You can use such notifications in many cases:

- Notify about completed tasks or failed projects
- Send daily KPIs
- Generate alerts on data quality issues, significant metric deviations or changes in metric trends, etc.

Previously, I wrote on [how to obtain data from web APIs](https://community.easymorph.com/t/making-your-data-better-with-web-apis/1483). Sending notification to Teams is done in a very similar fashion, except we _push_ information into a web API, instead of receiving data from it. Here is how it works in a nutshell:

1. Add the "Incoming webhook" connector to your channel in MS Teams
2. Configure the connector and copy the endpoint URL from the connector
3. Create a "Web location" connector in EasyMorph. Paste the URL into the connector.
4. Use the "Web request" action in EasyMorph with the "Web location" connector configured in the previous step to send a particularly composed JSON (an example is provided below in the article) to the URL.

> Note that both Teams and EasyMorph have something that is called _connector_. When a connector is mentioned in this article make sure you understand whether it's a Teams connector or an EasyMorph connector.

Now, let's look closer at how to do it.

## Step 1: Add the "Incoming webhook" connector to your channel in MS Teams

Go to channel settings in Teams and select "Connectors".

 ![image](https://community.easymorph.com/uploads/default/original/2X/f/f3af4b15c6997631be0e4537a809f7bbc0d83929.png)

In the list of connectors, find the "Incoming webhooks" connector and press "Add".

 ![image](https://community.easymorph.com/uploads/default/original/2X/d/d9dfb681b52a3b7e7c5425b9cd79b9c4181fda33.png)

## Step 2: Configure the Teams connector

Now configure the connector: give it a name, and (optionally) change its icon. After that, Teams will generate a unique URL for posting messages in the channel.

 ![image](https://community.easymorph.com/uploads/default/original/2X/6/625e40b15d01933cc81a313662da10fc53d53d80.png)

The URL is rather long and looks like this:

```
https://yourcompany.webhook.office.com/webhookb2/435be63d-362d-4a02-b117-e525175fbc57@772e756f-e2e0-41cc-9816-52cc85c5e3b7/IncomingWebhook/62c622fa232d47e5ada8063c124655d3/06868a67-c335-439d-8ebd-1e331a0e47d7

```

For simplicity, Microsoft doesn't provide a means to secure the URL with a secret or some other form of authorization. So security, in this case, is only through obscurity. Therefore don't share the URL or any EasyMorph connector that contains the URL.

Also, make a copy of the URL because you won't be able to see it again (at least I couldn't find a way to do it).

## Step 3: Configure Web Location connector in EasyMorph

Now, when we have the URL, it's time to switch to EasyMorph. Open EasyMorph and [create a "Web Location" connector](https://easymorph.com/learn/web-requests.html). Paste the endpoint URL as below:

 ![image](https://community.easymorph.com/uploads/default/original/2X/0/08291a296087b628a053e079b4426614f18828ec.png)

No other configuration required.

## Step 4: Send a web request from EasyMorph to Microsoft Teams

Now the most fun part of it - sending a notification!

In your project, add the "Web request" action configured as below:

 ![image](https://community.easymorph.com/uploads/default/original/2X/6/677f309441882f85fa5bd1d8bc6941112522318d.png)

- Connector - use the "Web location" connector from Step 3 described above.
- Request method is POST
- Request body is Text

The request body specified in the action should be a JSON composed in a specific way. For instance, for the notification shown at the top of this article the following JSON was used:

```auto
{
    "@type": "MessageCard",
    "@context": "https://schema.org/extensions",
    "summary": "Release update",
    "themeColor": "0078D7",
    "title": "EasyMorph Desktop installer has been updated on easymorph.com",
    "sections": [
        {           
            "facts": [
                {
                    "name": "Old version:",
                    "value": "{Parameter_old}"
                },
                {
                    "name": "New version:",
                    "value": "{Parameter}"
                }
            ],
            "text": "EasyMorph Desktop installer has been updated to {Parameter}."
        }
    ]
}

```

Note that it is possible to insert EasyMorph parameters into the JSON. The JSON above has 2 parameters inserted: {Parameter} and {Parameter\_old}.

When using parameters, use the text editor's preview mode to see the exact JSON that will be sent in the web request.

 ![image](https://community.easymorph.com/uploads/default/original/2X/a/aa187b1d0510d3b81a6d2db649448a01ba6899e1.png)

Here is a sample project:  
[teams-notification.morph](https://community.easymorph.com/uploads/short-url/ptOHJUPlJb2GsDIfWJvzvG53OhR.morph) (2.5 KB)

The full reference for composing Message Cards and examples are available here: [Actionable message card reference](https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference). Note that the Message Card format is being replaced with a new format called Adaptive Cards, but I didn't try it.

Actionable cards in Microsoft Teams can have quite impressive feature set. They can include tables, images, hyperlinks, and action buttons. It's an interesting area for exploration and experimentation. If you made interesting discoveries or use cases, please feel free to post a comment on this article.

---

<div class="post-metadata">

**Author:** ![RJO](https://community.easymorph.com/user_avatar/community.easymorph.com/rjo/32/4084_2.png) [@RJO](https://community.easymorph.com/u/RJO)\
**Post date:** [April 12, 2021, 12:25pm UTC](https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams/2637/2 "2021-04-12T12:25:08Z")

</div>

The new format is "Adaptive cards" and you can design your own cards there : [Designer | Adaptive Cards](https://adaptivecards.io/designer/) It can even be interactive (question/answer).

---

<div class="post-metadata">

**Author:** ![David](https://community.easymorph.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@David](https://community.easymorph.com/u/David)\
**Post date:** [July 5, 2021, 12:00pm UTC](https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams/2637/3 "2021-07-05T12:00:36Z")

</div>

Hi,

note that the URL for the webhook can be retrieved as follows under the 'Connectors' config window:

 ![image](https://community.easymorph.com/uploads/default/original/2X/c/c64d98c2a6df0060d43eba85ef1680d275aa4ea1.png)

So should you forget to write it down after Step 2, you're still able to retrieve it there.

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [February 19, 2023, 9:54am UTC](https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams/2637/4 "2023-02-19T09:54:28Z")

</div>

A post was split to a new topic: [Problem with iterations](https://community.easymorph.com/t/problem-with-iterations/4303)

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [January 26, 2024, 10:04pm UTC](https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams/2637/5 "2024-01-26T22:04:46Z")

</div>

Microsoft Teams is now natively supported by EasyMorph, so sending messages from EasyMorph to Teams has become much simpler. See this article for details:

> [@How to send notifications to Microsoft Teams using Teams Bot](https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams-using-teams-bot/5138):
>
> Starting from version 5.7, it's possible to send notifications from [EasyMorph](https://easymorph.com) 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 Go to the "Apps" tab in Teams Find "EasyMorph Bot". Add to your team Select a channel in your team. [image] Step 2: Create a Teams Bot connector …

This topic is now closed.

---

<div class="post-metadata">

**Author:** ![dgudkov](https://community.easymorph.com/user_avatar/community.easymorph.com/dgudkov/32/5_2.png) [@dgudkov](https://community.easymorph.com/u/dgudkov)\
**Post date:** [January 26, 2024, 10:04pm UTC](https://community.easymorph.com/t/how-to-send-notifications-to-microsoft-teams/2637/6 "2024-01-26T22:04:52Z")

</div>


