Citizen Developer
Timespan
explore our new search
​
Power Automate: Email Dataverse Files
Power Automate
Dec 16, 2025 8:08 PM

Power Automate: Email Dataverse Files

by HubSite 365 about Pragmatic Works

Microsoft Power Automate: Email Dataverse file columns from model-driven apps via row-selected flow and Outlook

Key insights

  • Overview
    The video demonstrates how to email a single file stored in a Microsoft Dataverse file column from a model-driven app using Power Automate. It walks through the full pattern from app trigger to sending the email attachment.
  • Trigger
    Build an instant cloud flow triggered by When a row is selected in Dataverse and include an input for the recipient email. This starts the flow directly from the model-driven app record.
  • Dataverse actions
    Use Get a row by ID to fetch the record, then Download a file or an image (provide table name, row ID, and column name) to retrieve the file content and metadata like filename and MIME type.
  • Compose and send
    Add a Compose step to build the attachment filename dynamically, then attach the downloaded file content to an Office 365 Outlook Send an email action. Ensure the attachment field uses the format expected by the mail action (content bytes or base64 as required).
  • Multiple attachments
    To send several files in one message, build an array of attachment objects (name, content, contentType) and pass it to the Send an email action. This keeps emails consolidated and avoids sending many separate messages.
  • Common pitfalls & tips
    Do not use Update a row for File/Image columns—use Upload a file or an image or the Dataverse Web API for uploads. Avoid corrupted attachments by applying the correct base64 encoding/decoding and by extracting filenames from the download output before sending. Test the flow end-to-end from the app to the inbox.

Quick summary of the video

Pragmatic Works published a YouTube video that shows how to send a file stored in a Microsoft Dataverse file column as an email attachment using Power Automate. The presenter demonstrates an instant cloud flow triggered from a model‑driven app, then retrieves the file and attaches it to an Office 365 Outlook email. The walkthrough focuses on a single file column scenario, but it also references patterns for handling multiple files. Overall, the video aims to give a clear, repeatable pattern for app-to-email delivery.


How the flow is built

The video starts by creating a flow that runs when a row is selected in a model‑driven app, a trigger familiar to makers who want on‑demand automation. Next, the flow uses a Get a row by ID action to fetch the record and then uses the Dataverse action Download a file or an image to retrieve file content plus metadata such as filename and mime type. Finally, the presenter wires the downloaded content into an Office 365 Outlook Send an email action, and uses a Compose step to build a proper filename so the attachment arrives intact. The segment clearly walks viewers through each connector and parameter to reduce trial and error.


Technical details and common pitfalls

Dataverse exposes several storage models, including file/image columns and the legacy Annotation (attachment) table, and each requires different actions or API calls. For file columns, the correct pattern is to use the Dataverse file-specific actions rather than attempting an Update a row, which does not support file columns and will fail or behave unpredictably. A frequent issue is corrupted attachments, usually caused by incorrect base64 handling; the video emphasizes returning the base64 content under the expected parameter name so mail connectors accept it. Additionally, extracting filename and mime type from the download output matters because mail actions often need both to reconstruct the original file correctly.


Tradeoffs when architecting solutions

Sending files directly from Dataverse simplifies processes because it avoids moving content to intermediate storage like SharePoint, which reduces latency and operational overhead. On the other hand, relying on Dataverse file actions can tie your solution to specific connectors and quotas, and it may complicate scenarios that require versioning or advanced content management features better handled in dedicated file stores. Furthermore, batching multiple attachments into a single email improves user experience but increases flow complexity, since you must build arrays of attachment objects and manage memory limits in long or heavy flows.


Challenges and mitigation strategies

One practical challenge is ensuring the correct encoding and parameter names so that the mail action recognizes the attachment content and filename. Makers can avoid corruption by following community-tested expressions and by using explicit compose or parse steps to shape the attachment payload. Another challenge is identifying where the file lives: the flow must use the appropriate Dataverse action for a File column, an Annotation record, or an activity file table, and the wrong choice leads to runtime errors. To mitigate these risks, the video suggests testing with small files, checking JSON outputs in run history, and reusing the demonstrated pattern across similar tables.


Best practices and why they matter

Adopt a consistent pattern: trigger from the app, fetch the row, download the file, build a proper attachment object, and send the mail—this sequence minimizes surprises and makes flows easier to maintain. Additionally, preserve metadata such as filename and mime type so recipients can open files as expected, and prefer Dataverse-native actions when working with Dataverse file columns to honor supported APIs. Finally, makers should document limits, test edge cases like large files, and consider user permissions and auditing implications when automating file delivery from production data.


Implications for makers and organizations

The Pragmatic Works video offers a practical, end‑to‑end example that many Power Platform teams can adapt quickly, boosting productivity in scenarios that require ad hoc file sharing from model‑driven apps. However, organizations must weigh simplicity against governance and scale: direct Dataverse attachments suit many workflows, but larger programs may need a hybrid approach that combines Dataverse for metadata with dedicated content stores for heavy file use. In any case, the video provides a useful baseline and highlights the technical choices and tradeoffs makers should consider before production deployment.


Power Automate - Power Automate: Email Dataverse Files

Keywords

power automate email attachments, dataverse file attachments, send dataverse attachments email, power automate get file content dataverse, dataverse email flow attachments, power platform send attachments, create email with dataverse files, attach dataverse files to email