PowerShell to MS Teams via webhook doesnt send all data


I’m currently working on a RPA project where I use MS Teams to monitor the transactions across 4 different softwarebots. I recently changed from Slack to MS Teams, and now i’m not seeing the full feed of post in Teams.

For every transaction completion i send a POST action to the Teams channel which should show on my teams channel. Every transaction takes between 20-60 seconds, and should keep posting as long as the bots are running.

Usually I get the for 20-90 minutes and then it stops,

This is the code that im posting:

“Invoke-RestMethod -Method post -ContentType ‘Application/Json’ -Body '{“text”:”[*WINDOWS_USERNAME] > Underskudsregister kørsel starter > [*TIME] [*DATE] “}’ -Uri [%TeamsChannelURLUnderskud]”

This is more of a Microsoft Teams question than a general Powershell questions. While you might get lucky and find someone that has worked with the API, you may have better luck in a Teams developer forum: