Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Website] [AdaptvieCard alternative MessageCard summary property] #11730

Open
ChetanSharma-msft opened this issue Oct 25, 2024 · 11 comments
Open
Assignees
Labels
teams-developer-support Question related to extensibility (Bot, ME, Tab) would be marked under this label

Comments

@ChetanSharma-msft
Copy link
Collaborator

Steps to reproduce

Copied from: microsoft/AdaptiveCards#8962
Posted by: @KaMa-linkai

Details:

Temasでwebhookにより自社のホストよりデイリーの通知を行っています。
O365コネクタがobsoleteになりworkflowsに切り替えという事で試しています。
MessageCardを使っていたましたがAdaptiveCardへ更新しました。

MessageCardではsummaryプロパティによりTeamsのアクティビティ通知にテキストを表示出来たのですがAdaptiveCardで同様の事がしたいです。
MessageCardのAndroidでの通知を添付します。
AdaptiveCardだと「workflowsからの投稿」でプレビュー部のテキストは「Card」となります。投稿者は構わないのですがプレビュー部のテキストをwebhook呼び出し側から送り込みたいです。AdaptiveCardのスキーマにはMessageCardのsummaryのようなプロパティは見つけられませんでした。
Teamsの通知で短いテキストをwebhookから設定するAdaptiveCard以外の他代替手段などでも構いません。
Teamsサポートに問い合あせたところこちらを指示されたのでポストします。よろしく。
URL: https://adaptivecards.io/samples/
スクリーンショット 2024-07-16 10 08 38
image

Expected behavior

NA

Actual behavior

NA

Error details

No response

@ChetanSharma-msft ChetanSharma-msft added the teams-developer-support Question related to extensibility (Bot, ME, Tab) would be marked under this label label Oct 25, 2024
@sayali-MSFT
Copy link

@KaMa-linkai - Thanks for reporting your issue.
We will check this at our end and will get back to you.

@sayali-MSFT
Copy link

While Adaptive Cards do not have a direct equivalent to the summary property, you can set a short text at the top of your card using the text property of a TextBlock. This will not be in the preview section but will be displayed prominently in the card itself.

Example:

{
    "type": "AdaptiveCard",
    "body": [
        {
            "type": "TextBlock",
            "text": "Your summary text here",
            "weight": "Bolder",
            "size": "Medium"
        },
        {
            "type": "TextBlock",
            "text": "Detailed content of the notification..."
        }
    ],
    "version": "1.2"
}

You can refer this-https://learn.microsoft.com/en-us/adaptive-cards/authoring-cards/universal-action-model

@KaMa-linkai
Copy link

KaMa-linkai commented Oct 29, 2024

thanks. (I want to output to the preview... to check on notification (Android).)

@sayali-MSFT
Copy link

Apologies for the delay in response.
Could you please elaborate more on your requirements, so that we can investigate from our end.

@villelahdenvuo
Copy link

villelahdenvuo commented Nov 14, 2024

@sayali-MSFT The question is how to provide a summary for a card's content similar to the old summary field of the MessageCard. Because currently any Teams notification & Activity log just says "Card":

Screenshot 2024-11-14 at 13 47 25

Also related: https://ideas.powerautomate.com/d365community/idea/d5a96d54-09e7-46da-8aa2-94d82aa3389d

Currently the AdaptiveCard spec doesn't seem to include anything except fallbackText, but that doesn't seem to be meant as a summary, more as a technical error message when cards are not supported.

@Prasad-MSFT Prasad-MSFT added the needs-author-feedback Needs more info from the customer. label Nov 14, 2024
@Prasad-MSFT Prasad-MSFT removed the needs-author-feedback Needs more info from the customer. label Nov 14, 2024
@sayali-MSFT
Copy link

@villelahdenvuo - Currently there is no way to change the preview for the messages (in the notification popup and Activity screen) sent by workflow. It will show as 'Card' which is by design.

We are discussing this with documentation team internally to get it updated in official documentation as well.

@villelahdenvuo
Copy link

I understand that displaying "Card" is by design, but I am here to question the design:

I receive multiple cards per day e.g. PR requests, New Relic alerts and more. Currently all those notifications have the exact same text:

Workflows posted in a channel Channel Name in Team Name
Card

And I never know; Is it a new PR request or is the production down. 🆘

So how is that design a good user experience? The previous MessageCard had a wonderful summary field that could be used to summarize the card content exactly for this purpose! We need something similar either in AdaptiveCard or in the Teams API to provide a notification summary.
Or you can use GenAI to summarize the card content automatically! Anything is better than just "Card".

@villelahdenvuo
Copy link

For anyone else looking into this, I found a pretty solid but ugly workaround for Power Automate workflows:

  1. Receive Webhook
  2. Post a message in a chat or channel (Normal message with a summary!)
  3. Update an adaptive card in a chat or channel (The card you actually want to send)
Screenshot 2024-11-14 at 15 02 52

@sayali-MSFT
Copy link

@villelahdenvuo -Thank you for your patience.
We have already shared your valuable feedback with our engineering team. As soon as we receive any updates from them, we will promptly inform you.

@pedrocecchetti
Copy link

@sayali-MSFT Thanks for the answer and for taking that to be discussed internally.
We had done the migration to the new Power automate workflows, and because these notifications only show Card it makes pretty hard to differentiate.

I agree with @villelahdenvuo that we should have something similar to the summary definition, in order to be able to have a meaningful notification system.

@ddoorn
Copy link

ddoorn commented Nov 28, 2024

@villelahdenvuo Could you provide additional details to the workaround? I've tried to follow it, but best I could make it do was this:
image

Screenshots of the internal logic of each action in your workflow so we can see the configuration would be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
teams-developer-support Question related to extensibility (Bot, ME, Tab) would be marked under this label
Projects
None yet
Development

No branches or pull requests

8 participants