2 Answers
- Newest
- Most votes
- Most comments
0
We are sending to Microsoft Teams that payload format.
{ "text": "STRINGYFIED_JSON" }
Where STRINGYFIED_JSON = the serialised SNS message object.
I tested further by adding a placeholder property to the blank object for additionalAttributes and Teams did accept that and rendered proper JSON in the post.
# Add placeholder property to potentially empty object {} in additionalAttributes
# Microsoft Teams may not like it and not render in rendered post text.
snsMessage['additionalAttributes']['placeholder'] = "Prevent empty object."
answered 2 years ago
0
As described in the Knowledge Center Article, the minimum payload for TEAMS has to be:
{"text": "Some Text"}
Just {}
won't work.
The article simply uses the JSON payload of the SNS message and forwards it to the TEAMS Webhook, however they support Adaptive Cards and their legacy format Actionable Message which allows you to format your information quite nicely. Our team uses the Python module pyadaptivecards to make the layout of our cards easier.
answered 2 years ago
Relevant content
- asked 10 months ago
- asked 4 months ago
- asked 9 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago