If you’ve ever tried to upload a file to a Dataverse row using Power Automate and ended up confused by the “Apply to Each” loop appearing out of nowhere, or the Row ID not resolving the way you expected, you’re not alone. I’ve seen this trip up a lot of people, even those who’ve been using Power Automate for years.
In this tutorial, I’ll walk you through the entire process using a real scenario from one of my projects. You’ll see exactly which actions to use, how to configure them, and — just as importantly — what to watch out for so your flow doesn’t fail silently.
By the end of this, you’ll have a working flow that:
- Picks up an email attachment from Outlook
- Matches the sender to a row in your Dataverse table
- Uploads the file directly to a File column in that row
Let’s get into it.
What You Need Before You Start
Before building the flow, make sure you have:
- A Dataverse table with at least one File column (not a text column, not an annotation/notes column — a proper File type column)
- A Power Automate Premium licence, because the Dataverse actions used here are premium connectors
- Access to an Office 365 Outlook mailbox connected to Power Automate
- The logical name of your File column (you can find this inside the column settings in your Dataverse table — it usually looks like cr0e5_Attachments or similar)

Quick note from me: A lot of people accidentally create a “Notes” or “Annotation” column thinking it’s the same as a File column. It’s not. The Upload a file or an image action in Power Automate only works with a proper File or Image column type. If your column isn’t showing up in the action, this is almost always the reason.
Dataverse File Column vs. Image Column — Which One Do You Need?
Before building anything, it’s worth knowing the difference between the two column types that work with the Upload a file or an image action.
| File Column | Image Column | |
|---|---|---|
| Best for | Documents, PDFs, Word files, spreadsheets | Profile photos, product images, thumbnails |
| Max file size | 128 MB (default, configurable up to 128 MB per upload) | 30 MB |
| Supported formats | Any file type | Image formats (JPG, PNG, GIF, etc.) |
| Thumbnail support | No | Yes (auto-generates thumbnails) |
| Power Automate action | Upload a file or an image | Upload a file or an image |
| Download action | Download a file or an image | Download a file or an image |
For this tutorial, I’m using a File column named Attachments in the IT Issue Resolutions table. The scenario: when someone emails me with a file attached, I want Power Automate to match their email address to a row in this Dataverse table and upload the attachment to that row.
The Dataverse Table Setup
Here’s the structure of the IT Issue Resolutions table I’m using:
- Sender — Primary column, single line of text (stores the sender’s name or email)
- Issues — Single line of text
- Report Date — Date column
- Status — Choice column (Approved, Rejected, Pending)
- Attachments — File column (this is where the uploaded file will land)

If you don’t have a File column yet, go to your Dataverse table, click + New column, and select File as the data type. Save it and grab the logical name — you’ll need it later.
Upload a File to Dataverse Using Power Automate
Now we need to build a flow to upload a file to Dataverse. Refer to the steps below:
Step 1: Create a New Automated Cloud Flow
- Go to Power Automate and sign in
- Click My flows in the left sidebar
- Click + New flow → Automated cloud flow
- Give your flow a name — I called mine Upload Email Attachment to Dataverse
- In the trigger search box, type When a new email arrives and select When a new email arrives (V3) from Office 365 Outlook
- Click Create

Step 2: Configure the Email Trigger
Once the trigger is added, expand it and set this:
- Include Attachments → Set to Yes

This is essential. Without it, the flow won’t have access to the email attachments at all. Everything else in the trigger can stay at its default unless you want to filter by a specific folder or sender.
Step 3: Add the Get Attachment (V2) Action
Click the + icon below the trigger and search for Get attachment. Select Get Attachment (V2) from the Office 365 Outlook connector.
Configure it like this:
- Message Id → Click into the field and select Message Id from the dynamic content panel under When a new email arrives (V3)
Here’s the “gotcha” I mentioned earlier: The moment you select Message Id, Power Automate will automatically wrap everything in an Apply to Each loop and set the loop value to Attachments. This is normal — don’t delete it. It’s happening because one email can have multiple attachments, so Power Automate is iterating through each one.
Inside the loop, finish configuring Get Attachment (V2):
- Attachment Id → Select Attachments Attachment Id from the dynamic content panel under When a new email arrives (V3)

Step 4: Add the List Rows Action (Dataverse)
Still inside the Apply to Each loop, click + and add a new action. Search for List rows and select the Microsoft Dataverse – List rows [Premium] action.
Configure it:
- Table name → Select IT Issue Resolutions (or your table name) from the dropdown
- Filter rows → Enter the OData filter below:
contains(cr0e5_Sender, 'From')
Replace cr0e5_Sender with the logical name of your Sender column. For the ‘From’ part, delete the placeholder text and select From from the dynamic content panel under When a new email arrives (V3).

What this does: it looks through your Dataverse table and finds the row where the Sender field contains the email address of whoever sent you the email. So if Sonam sends you an email from [email protected], the filter will find Sonam’s row.
Common error here: If you see an error like “Could not find a property named ‘cr0e5_Sender'”, it means the logical name you’ve used has a capitalisation mismatch or a typo. Go back to your Dataverse table, open the column settings, and copy the logical name exactly as shown — Dataverse logical names are case-sensitive in OData filters.
Step 5: Add the Upload a File or an Image Action (Dataverse)
Still inside the Apply to Each loop, click + again and add Upload a file or an image [Premium] from Microsoft Dataverse.
Configure the fields:
- Table name → Select IT Issue Resolutions
- Row ID → Click into the field and select IT Issue Resolutions from the dynamic content panel under the List rows action (not from the trigger — this is another common mistake)
- Column name → Select Attachments (your File column) from the dropdown
- Content → Select Content Bytes from the dynamic content panel under Get Attachment (V2)
- Content name → Select Attachments Name from the dynamic content panel under Get Attachment (V2)

A second Apply to Each loop may wrap around this action automatically when you set the Row ID. That’s also expected — it’s iterating over the matched rows from the List rows action.
Step 6: Save and Test the Flow
- Click Save in the top right
- Click the Flow checker button (the ✓ icon) to check for any configuration errors — fix any that appear before testing
- Click Test → Select Manually → Click Test
- Send a test email from an account whose email address or name exists in your Dataverse table — and make sure to attach a file to that email
- Check the flow run — each step should show a green tick

Once it completes successfully, go back to your Dataverse table and refresh the view. You should see the file now attached to the matching row in the Attachments column.
Step 7: Verify and Download the File
To confirm the file was uploaded correctly:
- Open the Dataverse table in Power Apps (make.powerapps.com)
- Find the row (e.g., Sonam’s row)
- Click Edit row using Form from the top menu
- You’ll see the file link in the Attachments field — click it to open or download it

Common Errors and How to Fix Them
This is the section I wish every tutorial included. Here are the issues I’ve seen most often with this flow:
1. “Apply to Each” appears unexpectedly
This is normal. It happens because Message Id is a reference that can relate to multiple attachments. Don’t remove the loop — configure your actions inside it.
2. Row ID not resolving or returning empty
Make sure you’re pulling Row ID from the List rows action’s dynamic content, not from the trigger. The trigger doesn’t know your Dataverse Row ID — only the List rows action does.
3. Content Bytes returns null
This usually happens when the email contains inline images (like a logo in an email signature) rather than true file attachments. Power Automate treats inline images differently from attached files. To avoid this, add a condition before the Upload action: check that Attachments Name is not empty, or filter only for specific file types (e.g., .pdf, .docx).
4. File column not showing up in the Upload action
The “Upload a file or an image” action only supports proper File or Image column types. If you created a Notes/Annotation column or a multiline text column by mistake, it won’t appear here. You’ll need to create a new File column and use that instead.
5. OData filter error — property not found
Dataverse logical names are case-sensitive in filter expressions. If you see an error about a property not being found, go back to your column settings and copy the logical name exactly, including the prefix (like crf9a_).
6. Flow fails silently with no visible error
Turn on Run After settings and add a Send an email or Post a Teams message action in a parallel branch that only runs on failure. This gives you an alert when something goes wrong instead of having to check the flow run history manually.
Variations — Other Ways to Trigger This Flow
The email-based trigger is a common starting point, but you can adapt this same pattern for other scenarios:
Upload from a Power Apps form submission
Instead of the email trigger, use When a row is added (Dataverse trigger) or accept base64-encoded file content from Power Apps via an HTTP request trigger. Pass the file content and file name from Power Apps into the flow, then run the Upload action.
Upload from a SharePoint document library
Use the When a file is created or modified (properties only) trigger from SharePoint, then use Get file content to retrieve the file bytes, followed by the same Dataverse Upload action.
Upload multiple attachments in a loop
The flow in this tutorial already handles multiple attachments via the Apply to Each loop. If you want to batch-upload files from a folder (e.g., OneDrive), use the List files in folder action from OneDrive, loop through the results, and run the Upload action for each file.
What This Flow Looks Like End to End
Here’s a quick summary of the full flow structure:
- Trigger: When a new email arrives (V3) — Include Attachments: Yes
- Apply to Each (auto-created — value: Attachments)
- Get Attachment (V2) — Message Id + Attachment Id from trigger
- List rows [Premium] — Filter by sender email using OData
- Apply to Each (auto-created — value: List rows result)
- Upload a file or an image [Premium] — Row ID from List rows, Content from Get Attachment
You may like the following Power Automate tutorials:
- Create a PDF from Excel using Power Automate
- Loop Through SharePoint List Items in Power Automate
- Power Automate Condition if a String is Empty
- Parse JSON Object to Array in Power Automate
- Conditionally Update SharePoint list items using Power Automate
Frequently Asked Questions
Can I upload multiple files to the same Dataverse row in one flow run?
Yes — as long as each email attachment loops through the Apply to Each, each file will be uploaded in its own iteration. Just make sure each file gets a unique name so they don’t overwrite each other in the File column.
Does this work without a Premium licence?
No. The List rows and Upload a file or an image actions are both premium Dataverse actions. You’ll need a Power Automate Premium (formerly Per User Plan) or a Power Apps Premium licence.
Can I use this to upload images instead of documents?
Yes, but use an Image column in your Dataverse table instead of a File column. The action name is the same (Upload a file or an image), but make sure your column type matches what you’re uploading — otherwise the upload will fail or the image won’t render correctly.
What’s the maximum file size I can upload?
The default maximum file size for a Dataverse File column is 128 MB per file. This is configurable by your Dataverse environment admin. For Image columns, the limit is 30 MB.
Why is the file column showing as read-only in Power Automate?
This can happen if your security role doesn’t have write access to the specific column. Check your Dataverse security role and make sure it has create/write privileges on the table and the file column specifically.

Preeti Sahu is an expert in Power Apps and has over six years of experience working with SharePoint Online and the Power Platform. She is the co-author of Microsoft Power Platform: A Deep Dive book. As a Power Platform developer, she has worked on developing various tools using Power Apps and Power Automate. She also makes Microsoft 365 videos and shares them on YouTube.