elastic / elastic/docs-content

[Website]: suggested improvement for formatting in Microsoft Teams connector

Open
#4,054 1 comment 0 reactions 0 assignees View on GitHub
community source:web Team:Experience
Dominant language
No language data
Stars
47
Forks
261
Avg merge
3d 21h
Merged PRs (30d)
141

Description

### Type of issue

Other

### What documentation page is affected

https://www.elastic.co/docs/reference/kibana/connectors-kibana/teams-action-type

### What happened?

Following the steps on this page does work, but the resultant behaviour is a major step backwards from the way it used to work (before Microsoft deprecated "connectors") due to this bit:
> The message text. Markdown, images, and other advanced formatting are not yet supported.

Fortunately there is a partial workaround - instead of using `Post message in a chat or channel` as the second step in the workflow, use `Post card in a chat or channel` instead.

Then, after selecting the target Team & Channel as before, set `Adaptive card` to the following:
```json
{
"$schema": "https://adaptivecards.io/schemas/adaptive-card.json",
"type": "AdaptiveCard",
"version": "1.0",
"body": [
{
"type": "TextBlock",
"text": "@{triggerBody()?['text']}"
}
]
}
```

This wraps up the message text from Elastic in an Adaptive Card [`TextBlock`](https://adaptivecards.io/explorer/TextBlock.html) element, which supports [a sub-set of markdown](https://learn.microsoft.com/en-us/adaptive-cards/authoring-cards/text-features).

Now testing at `/app/management/insightsAndAlerting/triggersActionsConnectors/connectors`
```
This now supports **bold** and _italics_.

Also lists:
- thing
- another thing

Oh and [links](https://www.google.com).
```
comes through like this on Teams:

Image

Although this doesn't support `backtick code` or `# headings` like it used to via connectors, it is still a substantial improvement over the "plain text only" behaviour which results from following https://www.elastic.co/docs/reference/kibana/connectors-kibana/teams-action-type

### Additional info

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.