Data Bear

Dataverse File Columns: Email Attachments with Power Automate

Power BI Box plots

Working with Microsoft Dataverse file columns just got easier. If you’ve ever needed to email a document stored in a file column of a Dataverse table, you know it’s not straightforward out of the box. In this tutorial, we’ll walk through how to use Power Automate to extract and email an attachment from a Dataverse file column specifically from a model-driven app.

This method is perfect for scenarios like:

  • Sending client proposals directly from a model-driven app
  • Automating internal document workflows
  • Creating reusable patterns for single-file field types in Dataverse

 Check out Data Bear’s Power BI Training to improve your Power Platform skills.

What Are Dataverse File Columns?

A file column in Dataverse is a field that stores one file per record think of it as a one-to-one attachment system. If you need multiple files per record, you’d use notes or multiple file fields instead.

For this tutorial, we’re focused on the one-to-one file column use case: sending that single attached file via email when a record is selected.

The App Setup: Model-Driven App with Proposal Attachment

In the example used here:

  • We have a model-driven app with a custom Proposals table.
  • Each proposal has a PDF stored in a file column called proposal attachment.
  • The goal is to trigger a Power Automate flow by selecting a record and emailing the file.
Step 1: Create an Instant Cloud Flow in Power Automate

Begin by creating an instant cloud flow with a manual trigger:

  1. In Power Automate, create a flow within a solution.
  2. Use the trigger: “When a row is selected” from Microsoft Dataverse.
  3. Add a custom input field for the recipient’s email address.
Input Type: Email
Input Name: Email Address

 Note: The Dataverse connector is premium. Make sure your license supports it.Create an Instant Cloud Flow in Power Automate Dataverse file columns

Step 2: Get the Selected Record and File

To retrieve the selected proposal and its attachment:

  1. Get Row by ID
    • Table: Proposals
    • Row ID: from the trigger input
  2. Download a File or Image from Dataverse
    • Table: Proposals
    • Row ID: same as above
    • Column: proposal attachment

Only file/image columns will show up here.Get the Selected Record and File Dataverse file columns

Step 3: Compose the File Name

The “Download File” step gives you the file content, but not the file name. You’ll need to manually extract it:

  1. Add a Compose step before sending the email.
  2. Use this expression to get the file name:
outputs('Get_a_row_by_ID')?['body/proposalattachment_name']

(Replace proposalattachment with your actual column name.)

  1. Name this step: File Attachment Name

This ensures the correct file name is passed along with the content.

Step 4: Send the Email with Attachment

Use Office 365 Outlook  Send an Email (V2) action:

  • To: Email Address (input from trigger)
  • Subject: Demo File Attachment from Dataverse
  • Body: See attached.

Click “Show Advanced Options” and fill in:

  • Attachment Name: Outputs of Compose
  • Attachment Content: File Content from the download stepSend the Email with Attachment Dataverse file columns
Step 5: Test and Run the Flow
  1. Save and publish your app.
  2. Select a proposal record with an attachment.
  3. Click the Flow button.
  4. Choose your flow, enter an email address, and run it.
  5. Check your inbox  the file should arrive as an attachment!
Troubleshooting Tips
  • If your flow doesn’t appear in the app, re-publish the app or solution.
  • Make sure the file column is properly configured in Dataverse.
  • Confirm that the expression used to extract the file name is accurate.
Why Use This Pattern?

This Power Automate pattern is great for:

  • Sales teams sending proposals
  • HR departments emailing forms
  • Operations teams managing document workflows

And it’s reusable with any single-file column in Dataverse.

Final Thoughts

With a few smart Power Automate actions and expressions, you can streamline the process of sending files from Dataverse records. Whether you’re working in a model-driven app or building custom workflows, this technique will save time and reduce manual steps.

Level Up Your Power Platform Skills

Explore expert-led Power BI and Power Platform training from Data Bear to go deeper into automation, data modeling, and more.