Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft Flow SharePoint to Teams HTTP 413

I have a Microsoft Flow which pulls a SharePoint List item and it's attachments, creates a message, then sends that message to Teams through a Webhook connector.

In order to send the attachments, I am required to send the Base64 representation. I believe this is making the message too large, as I am receiving HTTP 413 response.

The message I am sending is correct (I tested it in the Actionable Message playground), but it's the connection (HTTP POST to Teams) which is failing. Please help me understand what I can do to allow the large message to pass through.

Error message:

The HTTP Post returns 200, but the body says:

Webhook message delivery failed with error: Microsoft Teams endpoint returned HTTP error 413 with ContextId tcid=2621360276746394848, server=EAP010230119133,cv=NwLUXyVdN0uhKCant2X4fw.0

JSON here: https://prod-27.westus.logic.azure.com/workflows/267e9bf8072f49c2bc5893e18713125e/runs/08586810469649730296076568902CU20/actions/Compose/contents/ActionOutputs?api-version=2017-07-01&se=2018-03-09T22%3A00%3A00.0000000Z&sp=%2Fruns%2F08586810469649730296076568902CU20%2Factions%2FCompose%2Fcontents%2FActionOutputs%2Fread&sv=1.0&sig=Qi0UCGvdzKUTtzd8uW27V1j0apMo--kyS5bVYUAmlME

like image 599
chriscam85 Avatar asked Dec 16 '25 18:12

chriscam85


2 Answers

Solution was to put images in a Picture Library in Sharepoint. This folder is Public.

like image 167
chriscam85 Avatar answered Dec 20 '25 12:12

chriscam85


Posting too large messages to the Teams webhook URL will issue the 413 HTTP status which means Payload Too Large. There is no official statement yet about the maximums regarding these payloads for the connector webhook.

I asked here this question regarding the message/payload sizes and some experimental results.

Regarding your specific questions, a small image is easily going over the 20KB. If you have to encode it further to Base64, the size will increase even more.

Hence for images, one should use links towards them.

like image 28
4 revs, 2 users 76% Avatar answered Dec 20 '25 12:12

4 revs, 2 users 76%



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!