
Boa tarde, tudo bem?
Estou criando um aplicativo que conecta primariamente SharePoint + PowerApps + Power automate
Fiz um fluxo para enviar um email assim que a lista é alterada ou criada mas por algum motivo sempre que ele envia o email os anexos que foram adicionados na lista veem corrompido e ilegíveis no email.
Já tentei fazer de N formas.
Convertendo Base64
Compose
Obtendo anexos antes
Usei 3 IA's diferentes para me ajuda mas de nenhuma forma estou conseguindo!
The corrupted attachment issue with SharePoint list attachments in Power Automate has one specific root cause — passing the wrong output from "Get attachment content" into the Send an Email (V2) action. Here is the correct approach:
CORRECT FLOW STRUCTURE:
1. Trigger: When an item is created or modified (SharePoint)
2. Get attachments
Action: Get attachments (SharePoint connector)
Pass the list name and item ID from the trigger.
This returns attachment metadata including the file name.
3. Apply to each (loop through attachments)
4. Get attachment content
Action: Get attachment content (SharePoint connector)
Pass the list name, item ID, and file identifier from the
Get attachments output.
5. Send an email (V2)
In the Attachments section, set:
Name -> DisplayName from Get attachments output
(e.g., items('Apply_to_each')?['DisplayName'])
Content -> body('Get_attachment_content')?['body']
USE THIS EXACT EXPRESSION — the body property only,
not the full action output.
Content Type -> Leave BLANK
Do not set this unless you specifically need to override it.
The Outlook connector handles encoding automatically.
WHAT NOT TO DO:
Do NOT wrap the content in base64()
Do NOT use base64ToString()
Do NOT pass the full Get attachment content output directly
These all cause the attachment to arrive corrupted or unreadable.
The Outlook connector encodes the attachment correctly when you
pass body('Get_attachment_content')?['body'] directly.