You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Microsoft Flow SharePoint转Teams报HTTP 413错误求助

Alright, let's tackle this HTTP 413 "Payload Too Large" error you're hitting when sending Base64-encoded attachments to Teams via Microsoft Flow. Since you confirmed the message structure works in the Actionable Message playground, the issue is definitely tied to the oversized payload from those Base64 attachments. Here's how to fix it:

Troubleshooting & Fixes for HTTP 413 Error in Microsoft Flow → Teams Webhook
  • First, confirm the root cause: Teams Webhook Payload Limits
    Teams incoming webhooks have a strict payload size limit (typically around 2MB). Since Base64 encoding increases file size by ~33%, even a 1.5MB original file will push the payload over the limit. To verify this:

    1. Test sending your message without attachments—if it succeeds, you’ve confirmed the attachments are the culprit.
    2. Try attaching a small file (under 1MB) encoded as Base64; if that works, size is definitely the issue.
  • Best Fix: Replace Base64 Attachments with Cloud Links
    Instead of embedding Base64 content directly into the payload, upload the SharePoint attachment to a cloud storage location (like a dedicated SharePoint library or OneDrive) and include a download link in your Teams message. This keeps the payload tiny and avoids the 413 error entirely.
    Here’s how to adjust your Flow:

    1. Add an action to save the SharePoint attachment to a cloud storage location (e.g., Create file in OneDrive/SharePoint).
    2. Generate a shareable link for the uploaded file (use Create share link action).
    3. Insert this link into your Teams message body instead of the Base64 attachment.
  • If You Must Use Base64: Compress Attachments First
    If your use case requires embedding attachments directly, add a compression step to reduce the file size before encoding:

    1. Use the Zip file action in Flow to compress the SharePoint attachment(s) into a single ZIP archive.
    2. Encode the ZIP file as Base64 instead of the original attachments—this can drastically reduce payload size, especially for files like documents or images.
    3. Double-check that the compressed Base64 payload stays under Teams’ 2MB limit.
  • Advanced: Switch to Microsoft Graph API for Higher Limits
    Incoming webhooks are great for simple messages, but if you regularly need to send large attachments, consider using the Teams Graph API instead. The Graph API supports direct attachment uploads to channels and has higher size limits, avoiding the need for Base64 embedding entirely.

  • Double-Check Your Base64 Encoding
    Even though your message worked in the playground, ensure Flow isn’t adding extra characters (like line breaks) to the Base64 string during encoding. Use a Compose action to output the raw Base64 content and verify it matches the clean encoding you tested in the playground.

内容的提问来源于stack exchange,提问作者chriscam85

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.20 08:07:12