Back to integrations
Dagster + Microsoft Teams

Dagster Integration:
Dagster + Microsoft Teams

Keep your team up to speed with Teams messages.

About this integration

By configuring this resource, you can post messages to MS Teams from any Dagster op or asset.

Installation

pip install dagster-msteams

Example

# Read the docs on Resources to learn more: https://docs.dagster.io/deployment/resources
import dagster as dg
from dagster_msteams import Card, MSTeamsResource


@dg.asset
def microsoft_teams_message(msteams: MSTeamsResource):
    card = Card()
    card.add_attachment(text_message="Hello there!")
    msteams.get_client().post_message(payload=card.payload)


defs = dg.Definitions(
    assets=[microsoft_teams_message],
    resources={"msteams": MSTeamsResource(hook_url=dg.EnvVar("TEAMS_WEBHOOK_URL"))},
)

About Microsoft Teams

Microsoft Teams is a business communication platform. Teams offers workspace chat and videoconferencing, file storage, and application integration.