EvotecIT / PSTeams

PSTeams is a PowerShell Module working on Windows / Linux and Mac. It allows sending notifications to Microsoft Teams via WebHook Notifications. It's pretty flexible and provides a bunch of options. Initially, it only supported one sort of Team Cards but since version 2.X.X it supports Adaptive Cards, Hero Cards, List Cards, and Thumbnail Cards. All those new cards have their own cmdlets and the old version of creating Teams Cards stays as-is for compatibility reasons.
MIT License
409 stars 41 forks source link

WARNING: Send-TeamsMessageBody - Couldn't send message. Execute message: Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 413 #53

Closed chaoscreater closed 1 year ago

chaoscreater commented 1 year ago

I'm getting the following error and it seems like the payload is too big.

These are the links I found that seem to be related: https://github.com/prometheus-msteams/prometheus-msteams/issues/29 https://stackoverflow.com/questions/49199443/microsoft-flow-sharepoint-to-teams-http-413

Does the module support chunking the message?

PrzemyslawKlys commented 1 year ago

No - we don't support chunking. There are couple reasons why:

  1. I don't know exact value when it breaks - I guess your article says 28KB
  2. For every single data I would need to check whether we are at the limit or not - time consuming
  3. Once we are at the limit, lets say we are in the middle of 3rd row 2nd column - how would I react? I have no clue what you as a user wanted.

Therefore I see this as something that is up to you to figure out messages small enough to fit your needs.