Skip to content

Commit 373d3a4

Browse files
authored
Merge pull request #1813 from elementary-data/ele-4028-messaging-integ
Ele 4028 messaging integ
2 parents 219d000 + cacd79f commit 373d3a4

File tree

13 files changed

+183
-860
lines changed

13 files changed

+183
-860
lines changed

dev-requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ types-pytz
1616
types-jsonschema
1717
types-PyYAML
1818
types-setuptools
19-
pandas-stubs
2019
types-retry
2120
types-decorator

docs/_snippets/setup-teams-integration.mdx

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@ Call it `Elementary` (or whatever you prefer) and connect it to the workspace of
3434

3535
</Accordion>
3636

37-
Now it is time to setup the webhook for this channel.
37+
Now it's time to set up a webhook. You have two options for creating a webhook:
3838

39-
<Accordion title="Create Teams Webhook">
39+
<Accordion title="Option 1: Create Teams Webhook using Connectors (Legacy)">
4040

41-
## Create a webhook
41+
## Create a webhook using Connectors
42+
43+
**Note:** Microsoft 365 Connectors are being deprecated. Consider using Power Automate Workflows (Option 2) for new integrations.
4244

4345
Go to a channel in your Team and choose `Manage channel`
4446

@@ -77,7 +79,38 @@ Copy the URL of the webhook.
7779

7880
</Accordion>
7981

80-
Lastly, pass the webhook to the CLI as a param or in the `config.yml` file:
82+
<Accordion title="Option 2: Create Teams Webhook using Power Automate (Recommended)">
83+
84+
## Create a webhook using Power Automate
85+
86+
You can create a webhook using Power Automate in two ways:
87+
88+
### Method 1: Directly from Teams (Recommended)
89+
90+
1. Go to your Teams channel
91+
2. Click the three dots (...) next to the channel name
92+
3. Select `Workflows`
93+
4. Choose the template "Post to channel when a webhook request is received"
94+
5. Copy the webhook URL
95+
96+
### Method 2: From Power Automate Website
97+
98+
1. Go to [Power Automate](https://flow.microsoft.com)
99+
2. Create a new instant cloud flow
100+
3. Search for "When a HTTP request is received" as your trigger
101+
4. In the flow, add a "Post adaptive card in a chat or channel" action
102+
5. Configure the team and channel where you want to post
103+
6. Save the flow and copy the HTTP POST URL
104+
105+
**Important Notes:**
106+
107+
- When using Power Automate Workflows, Elementary CLI cannot directly verify if messages were successfully delivered. You'll need to monitor your workflow runs in Power Automate to check for any delivery issues.
108+
- Workflows can't post in private channels as a flow bot, but can post on behalf of a user
109+
- Workflows can only be created in your default environment
110+
111+
</Accordion>
112+
113+
Lastly, pass the webhook URL (from either method) to the CLI as a param or in the `config.yml` file:
81114

82115
<Accordion title="Teams config as CLI params">
83116

docs/cloud/integrations/alerts/ms-teams.mdx

Lines changed: 54 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ title: "Microsoft Teams"
33
---
44

55
Elementary's Microsoft Teams integration enables sending alerts when data issues happen.
6+
The alerts are sent using Adaptive Cards format, which provides rich formatting and interactive capabilities.
67

78
The alerts include rich context, and you can create [alert rules](/features/alerts-and-incidents/alert-rules) to distribute alerts to different channels and destinations.
89

@@ -30,30 +31,29 @@ The alerts include rich context, and you can create [alert rules](/features/aler
3031
</div>
3132
</Frame>
3233

33-
3. For each MS Teams channel you connect to Elementary, you will need to create a Webhook.
34+
3. For each MS Teams channel you connect to Elementary, you will need to create a Webhook. There are two ways to create a webhook:
3435

35-
<Accordion title="How to create a Microsoft Teams webhook?">
36-
1. Go to a channel in your Team and choose `Manage channel`
36+
<Accordion title="Option 1: Using Microsoft Teams Connectors (Legacy)">
37+
1. Go to a channel in your Team and choose `Manage channel`
3738

3839
<Frame>
3940
<div className="dark:bg-white rounded-md p-1">
4041
<img
41-
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707203620/npn3p0tsmdvk723etyxn.png"
42-
alt="Teams manage channel"
43-
width="400"
42+
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707203620/npn3p0tsmdvk723etyxn.png"
43+
alt="Teams manage channel"
44+
width="400"
4445
/>
4546
</div>
4647
</Frame>
4748

48-
4949
2. Click on `Edit` connectors.
5050

5151
<Frame>
5252
<div className="dark:bg-white rounded-md p-1">
5353
<img
54-
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707203932/utnld7rzvgiwfgumzhtv.png"
55-
alt="Teams edit connectors"
56-
width="500"
54+
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707203932/utnld7rzvgiwfgumzhtv.png"
55+
alt="Teams edit connectors"
56+
width="500"
5757
/>
5858
</div>
5959
</Frame>
@@ -63,9 +63,9 @@ The alerts include rich context, and you can create [alert rules](/features/aler
6363
<Frame>
6464
<div className="dark:bg-white rounded-md p-1">
6565
<img
66-
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707204047/esvfhescsxgttanzv3kx.png"
67-
alt="Teams add incoming webhook"
68-
width="400"
66+
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707204047/esvfhescsxgttanzv3kx.png"
67+
alt="Teams add incoming webhook"
68+
width="400"
6969
/>
7070
</div>
7171
</Frame>
@@ -74,29 +74,55 @@ The alerts include rich context, and you can create [alert rules](/features/aler
7474

7575
<Frame>
7676
<div className="dark:bg-white rounded-md p-1">
77-
<img
78-
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707204465/mcncjpvsnptd0gcsbb21.png"
79-
alt="Teams create webhook"
80-
width="400"
81-
/>
77+
<img
78+
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707204465/mcncjpvsnptd0gcsbb21.png"
79+
alt="Teams create webhook"
80+
width="400"
81+
/>
8282
</div>
8383
</Frame>
8484

8585
5. Copy the URL of the webhook.
8686

8787
<Frame>
8888
<div className="dark:bg-white rounded-md p-1">
89-
<img
90-
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707204718/gkt2uhz2qaow1lm1frnp.png"
91-
alt="Teams copy URL webhook"
92-
width="400"
93-
/>
89+
<img
90+
src="https://res.cloudinary.com/dgxyrldax/image/upload/v1707204718/gkt2uhz2qaow1lm1frnp.png"
91+
alt="Teams copy URL webhook"
92+
width="400"
93+
/>
9494
</div>
9595
</Frame>
9696

97+
**Note:** Microsoft 365 Connectors (previously called Office 365 Connectors) are nearing deprecation, and the creation of new Microsoft 365 Connectors will soon be blocked. Consider using Power Automate Workflows instead.
9798

9899
</Accordion>
99100

101+
<Accordion title="Option 2: Using Power Automate Workflows (Recommended)">
102+
103+
You can create a webhook using Power Automate in two ways:
104+
105+
### Method 1: Directly from Teams (Recommended)
106+
107+
1. Go to your Teams channel
108+
2. Click the three dots (...) next to the channel name
109+
3. Select `Workflows`
110+
4. Choose the template "Post to channel when a webhook request is received"
111+
5. Copy the webhook URL
112+
113+
### Method 2: From Power Automate Website
114+
115+
1. Go to [Power Automate](https://flow.microsoft.com)
116+
2. Create a new instant cloud flow
117+
3. Search for "When a HTTP request is received" as your trigger
118+
4. In the flow, add a "Post adaptive card in a chat or channel" action
119+
5. Configure the team and channel where you want to post
120+
6. Save the flow and copy the HTTP POST URL
121+
122+
**Important Note:** When using Power Automate Workflows, Elementary CLI cannot directly verify if messages were successfully delivered. You'll need to monitor your workflow runs in Power Automate to check for any errors.
123+
124+
</Accordion>
125+
100126
4. Configure your Microsoft Teams webhooks, and give each one a name indicating it's connected channel:
101127

102128
<Frame>
@@ -112,17 +138,18 @@ width="400"
112138
5. Select a default channel for alerts, and set the suppression interval.
113139

114140
<Note>
115-
The default channel you select will automatically add a default [alert rule](/features/alerts-and-incidents/alert-rules)
116-
to sends all failures to this channel. Alerts on warnings are not sent by default. To modify and add tules, navigate to `Alert Rules` page.
141+
The default channel you select will automatically add a default [alert
142+
rule](/features/alerts-and-incidents/alert-rules) to sends all failures to
143+
this channel. Alerts on warnings are not sent by default. To modify and add
144+
tules, navigate to `Alert Rules` page.
117145
</Note>
118146

119-
120147
<Frame>
121148
<div className="dark:bg-white rounded-md p-1">
122149
<img
123150
src="https://res.cloudinary.com/diuctyblm/image/upload/v1719906740/ms_teams_select_channel_and_suppression_vtbsks.png"
124151
alt="Select channel and suppression interval"
125-
width="800"
152+
width="800"
126153
/>
127154
</div>
128155
</Frame>

docs/oss/deployment-and-configuration/teams.mdx

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,23 @@ title: "Teams setup for Elementary CLI"
33
sidebarTitle: "Teams"
44
---
55

6-
Elementary Teams integration includes sending [Teams alerts](/oss/guides/alerts/send-teams-alerts) on failures in dbt tests and models.
6+
Elementary Teams integration includes sending [Teams alerts](/oss/guides/alerts/send-teams-alerts) on failures in dbt tests and models. The alerts are sent using Microsoft Teams Adaptive Cards format, which provides rich formatting and interactive capabilities.
77

88
## Integration options
99

10-
There is one integration option for Microsoft Teams: a Webhook. This method let you receive alerts from Elementary, but lacks
11-
some support that is available in the Slack integration solution.
12-
Below is features support comparison table (with Slack), to help you select the integration method.
10+
There are two ways to create a webhook for Microsoft Teams:
1311

14-
| Integration | Elementary alerts | Elementary report | Multiple channels | Slack workflows |
15-
| ------------- | ----------------- | ----------------- | ----------------- | --------------- |
16-
| Teams Webhook |||||
12+
1. **Microsoft Teams Connectors (Legacy)**: The traditional way of creating webhooks, but this method is being deprecated by Microsoft.
13+
2. **Power Automate Workflows (Recommended)**: The newer, more flexible way to create webhooks. Note that when using this method, Elementary CLI cannot directly verify if messages were delivered - you'll need to monitor your workflow runs in Power Automate.
14+
15+
Below is a features support comparison table (with Slack), to help you select the integration method.
16+
17+
| Integration | Elementary alerts | Elementary report | Multiple channels |
18+
| ------------------------ | ----------------- | ----------------- | ----------------- |
19+
| Teams Connector (Legacy) ||||
20+
| Power Automate Workflows ||||
21+
22+
**Note:** Microsoft 365 Connectors (previously called Office 365 Connectors) are nearing deprecation. We recommend using Power Automate Workflows for new integrations.
1723

1824
## Teams integration setup
1925

docs/oss/guides/alerts/send-teams-alerts.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ title: "Setup Teams alerts"
99
Before you can start using the alerts, make sure to [install the dbt package](/oss/quickstart/quickstart-cli-package), [configure a profile and install the CLI](/oss/quickstart/quickstart-cli).
1010
This is **required for the alerts to work.**
1111

12+
Elementary sends alerts using Microsoft Teams Adaptive Cards format, which provides rich formatting and interactive capabilities. You can create a webhook URL using either Microsoft Teams Connectors (legacy, being deprecated) or Power Automate Workflows (recommended).
13+
1214
<br />
1315
</Info>
1416

elementary/clients/teams/__init__.py

Whitespace-only changes.

elementary/clients/teams/client.py

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)