Applies the Vale findings spike review's `ensure`, `should`, and `since` decisions, following `word-choice.md#choose-words-that-have-one-meaning`. ## `ensure`, `ensures`, `ensuring`: every row marked valid - 148 lines in 70 files. - Most became `make sure`, `makes sure`, or `making sure`. - When the subject isn't a person, I used a verb that reads better, such as `guarantees`, `keeps`, `prevents`, `maintains`, or `provides`. - `admin/monitoring/health-check.md:227`: "Make sure that" is now "Make sure", so the step stays within `Coder.StepLength`. - Left as-is: `admin/setup/configuration-reference.md:1339`, which is generated from `codersdk`. ## `should` and `since`: only rows with a verdict or a note - `.style/README.md`: "what should be routed elsewhere" is now "what to route elsewhere". - `.style/content-guidelines.md`: - "Avoid mixing those modes within a single page." - "Every page must be accurate" - "Check docs claims against the actual implementation" - "must include the documentation" - "Support owns the content they produce." - "because they don't change" - `.style/styles/Coder/README.md`: "must link to the matching section". - `admin/external-auth.md`: - "The redirect URI for Gitea is ..." - "Use custom authentication and token URLs ...", which is now active voice. - `envbuilder-releases-known-issues.md`: "so it's experimental and prone to breaking changes". Rows marked unsure with no note were left alone: `content-guidelines.md` lines 49, 330, and 405, and `envbuilder/index.md:24`. The changed files have no new findings from other rules. --- AI-generated by Superblink on behalf of @nickvigilante. --------- Co-authored-by: coder[bot] <137810501+coder[bot]@users.noreply.github.com>
4.9 KiB
title
| title |
|---|
| Microsoft Teams notifications |
Microsoft Teams is a widely used collaboration platform, and with Coder's integration, you can enable automated notifications directly within Teams using workflows and Adaptive Cards
Administrators can configure Coder to send notifications via an incoming webhook endpoint. These notifications appear as messages in Teams chats, either with the Flow Bot or a specified user/service account.
Requirements
Before setting up Microsoft Teams notifications, make sure that you have the following:
- Administrator access to the Teams platform
- Coder platform >=v2.16.0
Build Teams Workflow
The process of setting up a Teams workflow consists of three key steps:
-
Configure the Webhook Trigger.
Begin by configuring the trigger: "When a Teams webhook request is received".
Make sure the trigger access level is set to "Anyone".
-
Setup the JSON Parsing Action.
Add the "Parse JSON" action, linking the content to the "Body" of the received webhook request. Use the following schema to parse the notification payload:
{ "type": "object", "properties": { "_version": { "type": "string" }, "payload": { "type": "object", "properties": { "_version": { "type": "string" }, "user_email": { "type": "string" }, "actions": { "type": "array", "items": { "type": "object", "properties": { "label": { "type": "string" }, "url": { "type": "string" } }, "required": ["label", "url"] } } } }, "title_markdown": { "type": "string" }, "body_markdown": { "type": "string" } } }This action parses the notification's title, body, and the recipient's email address.
-
Configure the Adaptive Card Action.
Finally, set up the "Post Adaptive Card in a chat or channel" action with the following recommended settings:
Post as: Flow Bot
Post in: Chat with Flow Bot
Recipient:
user_emailUse the following Adaptive Card template:
{ "$schema": "https://adaptivecards.io/schemas/adaptive-card.json", "type": "AdaptiveCard", "version": "1.0", "body": [ { "type": "Image", "url": "https://coder.com/coder-logo-horizontal.png", "height": "40px", "altText": "Coder", "horizontalAlignment": "center" }, { "type": "TextBlock", "text": "**@{replace(body('Parse_JSON')?['title_markdown'], '"', '\"')}**" }, { "type": "TextBlock", "text": "@{replace(body('Parse_JSON')?['body_markdown'], '"', '\"')}", "wrap": true }, { "type": "ActionSet", "actions": [@{replace(replace(join(body('Parse_JSON')?['payload']?['actions'], ','), '{', '{"type": "Action.OpenUrl",'), '"label"', '"title"')}] } ] }Notice: The Coder
actionsformat differs from theActionSetschema, so its properties need to be modified: includeAction.OpenUrltype, renamelabeltotitle. Unfortunately, there is no straightforward solution forfor-eachpattern.Feel free to customize the payload to modify the logo, notification title, or body content to suit your needs.
Enable Webhook Integration
To enable webhook integration in Coder, define the POST webhook endpoint created by your Teams workflow:
export CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT=https://prod-16.eastus.logic.azure.com:443/workflows/f8fbe3e8211e4b638...`
Finally, go to the Notification Settings in Coder and switch the notifier to Webhook.
Limitations
-
Public Webhook Trigger:
The Teams webhook trigger must be open to the public ("Anyone" can send the payload). It's recommended to keep the endpoint secret and apply additional authorization layers to protect against unauthorized access.
-
Markdown Support in Adaptive Cards: Note that Adaptive Cards support a limited set of Markdown tags.