SOLVED
Home

Microsoft Flow SharePoint to Teams HTTP 413

%3CLINGO-SUB%20id%3D%22lingo-sub-169983%22%20slang%3D%22en-US%22%3EMicrosoft%20Flow%20SharePoint%20to%20Teams%20HTTP%20413%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-169983%22%20slang%3D%22en-US%22%3E%3CDIV%20class%3D%22postcell%20post-layout--right%22%3E%0A%3CDIV%20class%3D%22post-text%22%3E%0A%3CP%3EI%20have%20a%20Microsoft%20Flow%20which%20pulls%20a%20SharePoint%20List%20item%20and%20it's%20attachments%2C%20creates%20a%20message%2C%20then%20sends%20that%20message%20to%20Teams%20through%20a%20Webhook%20connector.%3C%2FP%3E%0A%3CP%3EIn%20order%20to%20send%20the%20attachments%2C%20I%20am%20required%20to%20send%20the%3CCODE%3EBase64%3C%2FCODE%3E%20representation.%20I%20believe%20this%20is%20making%20the%20message%20too%20large%2C%20as%20I%20am%20receiving%20%3CCODE%3EHTTP%20413%3C%2FCODE%3E%20response.%3C%2FP%3E%0A%3CP%3EThe%20message%20I%20am%20sending%20is%20correct%20(I%20tested%20it%20in%20the%20Actionable%20Message%20playground)%2C%20but%20it's%20the%20connection%20(HTTP%20POST%20to%20Teams)%20which%20is%20failing.%20Please%20help%20me%20understand%20what%20I%20can%20do%20to%20allow%20the%20large%20message%20to%20pass%20through.%3C%2FP%3E%0A%3CP%3EError%20message%3A%3C%2FP%3E%0A%3CP%3EThe%20HTTP%20Post%20returns%20%3CCODE%3E200%3C%2FCODE%3E%2C%20but%20the%20body%20says%3A%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CP%3EWebhook%20message%20delivery%20failed%20with%20error%3A%20Microsoft%20Teams%20endpoint%20returned%20%3CCODE%3EHTTP%20error%20413%3C%2FCODE%3E%20with%20%3CCODE%3EContextId%20tcid%3D2621360276746394848%2C%20server%3DEAP010230119133%2Ccv%3DNwLUXyVdN0uhKCant2X4fw.0%3C%2FCODE%3E%3C%2FP%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EJSON%20here%3A%20%3CA%20href%3D%22https%3A%2F%2Fprod-27.westus.logic.azure.com%2Fworkflows%2F267e9bf8072f49c2bc5893e18713125e%2Fruns%2F08586810469649730296076568902CU20%2Factions%2FCompose%2Fcontents%2FActionOutputs%3Fapi-version%3D2017-07-01%26amp%3Bse%3D2018-03-09T22%253A00%253A00.0000000Z%26amp%3Bsp%3D%252Fruns%252F08586810469649730296076568902CU20%252Factions%252FCompose%252Fcontents%252FActionOutputs%252Fread%26amp%3Bsv%3D1.0%26amp%3Bsig%3DQi0UCGvdzKUTtzd8uW27V1j0apMo--kyS5bVYUAmlME%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noreferrer%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fprod-27.westus.logic.azure.com%2Fworkflows%2F267e9bf8072f49c2bc5893e18713125e%2Fruns%2F08586810469649730296076568902CU20%2Factions%2FCompose%2Fcontents%2FActionOutputs%3Fapi-version%3D2017-07-01%26amp%3Bse%3D2018-03-09T22%253A00%253A00.0000000Z%26amp%3Bsp%3D%252Fruns%252F08586810469649730296076568902CU20%252Factions%252FCompose%252Fcontents%252FActionOutputs%252Fread%26amp%3Bsv%3D1.0%26amp%3Bsig%3DQi0UCGvdzKUTtzd8uW27V1j0apMo--kyS5bVYUAmlME%3C%2FA%3E%3C%2FP%3E%0A%3C%2FDIV%3E%0A%3C%2FDIV%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-169983%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFlow%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMicrosoft%20Teams%20Incoming%20Webhook%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-173824%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20SharePoint%20to%20Teams%20HTTP%20413%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-173824%22%20slang%3D%22en-US%22%3ESolution%20was%20to%20put%20images%20in%20a%20Picture%20Library%20in%20Sharepoint.%20This%20folder%20is%20Public.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170157%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20SharePoint%20to%20Teams%20HTTP%20413%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170157%22%20slang%3D%22en-US%22%3EHere's%20the%20post%20about%20it%20on%20Stack%20Exchange%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fstackoverflow.com%2Fquestions%2F49182462%2Fimages-from-sharepoint-not-displaying-in-teams%22%20target%3D%22_blank%22%20rel%3D%22nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fstackoverflow.com%2Fquestions%2F49182462%2Fimages-from-sharepoint-not-displaying-in-teams%3C%2FA%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170127%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20SharePoint%20to%20Teams%20HTTP%20413%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170127%22%20slang%3D%22en-US%22%3EThat%20was%20my%20original%20setup%2C%20but%20the%20files%20wouldn't%20show%20up.%20I%20think%20SharePoint%20has%20some%20problem%20with%20showing%20images.%20Additionally%20some%20SharePoint%20expert%20explain%20to%20me%20that%20it%20shouldn't%20be%20used%20as%20an%20image%20hosting%20server.%20So%20he%20suggested%20that%20I%20get%20the%20image%20and%20then%20converted%20to%20base64%20to%20send%20along%20as%20the%20post.%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-170083%22%20slang%3D%22en-US%22%3ERe%3A%20Microsoft%20Flow%20SharePoint%20to%20Teams%20HTTP%20413%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-170083%22%20slang%3D%22en-US%22%3E%3CP%3EI'm%20not%20sure%20I've%20ever%20seen%20example%20of%20sending%20a%20file%20as%20part%20of%20a%20webhook%20post%2C%20I'm%20not%20sure%20that%20Teams%20supports%20it.%20Why%20wouldn't%20you%20just%20link%20back%20to%20the%20files%20in%20SharePoint%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Chris Campanile
Occasional Contributor

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/0858681046964...

4 Replies

I'm not sure I've ever seen example of sending a file as part of a webhook post, I'm not sure that Teams supports it. Why wouldn't you just link back to the files in SharePoint?

That was my original setup, but the files wouldn't show up. I think SharePoint has some problem with showing images. Additionally some SharePoint expert explain to me that it shouldn't be used as an image hosting server. So he suggested that I get the image and then converted to base64 to send along as the post.
Solution
Solution was to put images in a Picture Library in Sharepoint. This folder is Public.
Related Conversations
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
28 Replies
Tabs and Dark Mode
cjc2112 in Discussions on
2 Replies
Early preview of Microsoft Edge group policies
Sean Lyndersay in Discussions on
65 Replies
*Updated 9/3* Syncing in Microsoft Edge Preview Channels
Elliot Kirk in Articles on
202 Replies