Integrating with Microsoft Teams via Webhooks

As of version 1.1.0, SitecoreDXG now supports integration with Microsoft Teams for completion notifications via Incoming Webhooks. Like all logic that runs after generation completes, the Microsoft Teams integration is provided by a native completion handler plugin that posts a message to the Microsoft Teams Incoming Webhook URL with some basic information about the generation and any Helix validation errors that were identified.

Sample Notification

Depending on the information that you send in via the DocumentationConfiguration property of the OPTIONS_FILE_PATH JSON object, you should see a notification similar to the following sample appear in your Teams channel after generation completes:


Fortunately, Microsoft was nice enough to make setting up an Incoming Webhook for Teams super straightforward:

  1. Follow the instructions to set up a custom Incoming Webhook

  2. Copy your new Incoming Webhook URL for use in the next step

  3. Create/update the OPTIONS_FILE_PATH JSON object to be passed into your SitecoreDXG middleman to include the MS Teams completion handler and set its Params.Url property to your new Incoming Webhook URL, as follows:

    DocumentationConfiguration: {},
    CompletionHandlers: [{
        ID: "MSTeams_Notifier",
        Params: {
            "Url": ""

Note that this completion handler supports the default supported DocumentationConfiguration properties, and will display their information in the notification, including:

  1. DocumentationTitle

  2. CommitAuthor

  3. CommitHash

  4. CommitLink

  5. DeployLink

  6. ProjectName

  7. EnvironmentName

Last updated