Skip to content

msteamsv2 Receiver does not support Summary field #4319

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

Open
cbryant42 opened this issue Mar 28, 2025 · 8 comments
Open

msteamsv2 Receiver does not support Summary field #4319

cbryant42 opened this issue Mar 28, 2025 · 8 comments

Comments

@cbryant42
Copy link

The old msteams receiver supported adding/templating a Summary field, which is the display text for the notification and the displayed text inside the activity center. Now the notifications just say "{webhook name} Card". This isn't the biggest issue, but it would be nice to be able to customize this text to allow better notifications.

I've been looking into what changes this would require, and it does not look significant. However I do not have a pull request at the moment. I thought I would open this issue in advance to see if others also wanted this fixed.

Thanks!

@grobinson-grafana
Copy link
Collaborator

When we looked at the new Adaptive Cards/Power Automate API, it seems there was nowhere to use the summary, so we removed it from msteamsv2. If this is incorrect, please feel free to open a pull request with the fix.

@cbryant42
Copy link
Author

We have been using adaptive cards with a custom proxy for a while now is the only reason I knew this was possible. I'll work on getting a pull request in, but in the meantime, this is how you can structure the card to set the summary field.

	t := teamsMessage{
		Type:    "message",
		Summary: summary,
		Attachments: []Attachment{
			{
				ContentType: "application/vnd.microsoft.card.adaptive",
				ContentURL:  nil,
				Content: Content{
					Schema:  "http://adaptivecards.io/schemas/adaptive-card.json",
					Type:    "AdaptiveCard",
					Version: "1.2",
					Body: []Body{
						{
							Type:   "TextBlock",
							Text:   title,
							Weight: "Bolder",
							Size:   "Medium",
							Wrap:   true,
							Style:  "heading",
							Color:  color,
						},
						{
							Type: "TextBlock",
							Text: text,
							Wrap: true,
						},
					},
					Msteams: Msteams{
						Width: "full",
					},
				},
			},
		},
	}```

@grobinson-grafana
Copy link
Collaborator

Where did you find this as it's not mentioned in https://learn.microsoft.com/en-us/connectors/teams/?tabs=text1%2Cdotnet#request-body-schema?

@cbryant42
Copy link
Author

Honestly... I'm not sure. I made that change to my custom proxy in 2023 and didn't document where I found the documentation. I think I just tested a few iterations based on various forum posts I found around the topic like: https://stackoverflow.com/questions/68297798/push-notifications-toasts-summary-for-adaptive-cards-on-microsoft-teams
OfficeDev/teams-toolkit#6752
MicrosoftDocs/msteams-docs#11730 (comment)

@grobinson-grafana
Copy link
Collaborator

Just to be 100% sure, you're using the new Power Automate workflows and not the old Office365 connectors?

@cbryant42
Copy link
Author

Ahh, yes, my testing URL was the old Office365 connector. My apologies for the mistake. I'm going to see if I can get the flow workaround working as proposed in the last github link (MicrosoftDocs) I posted.

@mleguay-xelians
Copy link

There is an opened issue here: MicrosoftDocs/msteams-docs#11730 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants