Migrating SharePoint List Data with Image Columns to Dataverse
- Sivakumar K
- Sep 15
- 5 min read
In many real-world scenarios, you may need to migrate SharePoint list data into Dataverse. Power Platform provides Dataflows, an inbuilt tool that makes it easy to connect to SharePoint Online and move your data seamlessly into Dataverse.
We have already covered the basic data migration process in our
Previous article. Migrate a SharePoint list to an existing Dataverse table (via Dataflows). However, one common challenge remains: migrating image-type fields or attachments. As of today, this cannot be done directly with Dataflows.
In this article, we’ll walk you through a workaround to migrate the image column from a SharePoint list into a Dataverse table using Power Automate.
Scenario Overview:
For this example, we are working with a Visitors List in SharePoint. While all the data has been successfully migrated into Dataverse, the image column was left behind. Building on the process explained in our earlier article, we will now demonstrate how to handle the pending image column migration using a Power Automate flow
Flow Breakdown
The flow we designed can be divided into four key sections, as shown in the diagram below.
Each section is highlighted with a red box for better visibility. Before diving into the step-by-step walkthrough, this high-level view will give you a good understanding of how the process works end-to-end.

Section-1 Trigger & get Items
Step 1: Create an Instant Cloud Flow
Log in to the Power Automate portal.
Navigate to My flows and click + New flow → Instant cloud flow.
Provide a meaningful name for your flow so it’s easy to identify later.
Step 2: Configure SharePoint Get Items Action
Add the SharePoint – Get items action.
Select the appropriate Site Address and List Name from the dropdown (as shown in the screenshot below).
This step will fetch all the records from the SharePoint list that you want to process further.

Section 2: Loop Through the Items
In this section, we will set up actions to loop through each SharePoint list item and fetch both the attachment details and the original image name from the image column.
Step 1: Fetch image File Details
Add a SharePoint – Send an HTTP request to SharePoint action.
Select the Site Address of your SharePoint site.
Set the Method to GET.
Enter the following URI:
_api/web/lists/GetByTitle('Visitor')/items(@id)/AttachmentFiles?$select=FileName,ServerRelativeUrl&@id=@{items('Apply_to_each')?['ID']}
This request retrieves the Filename and ServerRelativeUrl of the attachment for the current item in the loop. The ID value is dynamically passed from the Get items action in the previous step.
Step 2: Fetch All Fields for the Current Record
Add another SharePoint – Send an HTTP request to SharePoint action.
Select the same Site Address.
Set the Method to GET.
Enter the following URI:
_api/web/lists/GetByTitle('Visitor')/items?$filter=Id eq @{items('Apply_to_each')?['ID']}
This request retrieves all fields of the current SharePoint list item, filtered by ID.
We will use this response to extract the original image name stored in the image column. In the next step, we’ll add a Compose action to capture that original name for further processing.


Step 3: Capture the Title (Unique Identifier)
Add a Compose action.
In the Inputs field, use an expression to collect the Title value from the Get items action.
This step ensures that we can identify the corresponding record in Dataverse when uploading the image.
Why use the Title field?
In this scenario, the Title column in the SharePoint Visitor list is used as the unique visitor ID. Since this same unique ID has already been imported into Dataverse, retrieving it here allows us to reliably match the SharePoint record with the correct Dataverse Row ID.
Note: If your setup uses a different field as the unique identifier, you should adapt this step to capture that field instead of Title.

Section 3: Condition Check – Verify if the File Exists
When migrating images, one of the common issues is handling records that don’t have any attachments. If the image column is empty, the flow may fail. To avoid this, we add a Condition step to validate whether an attachment exists before proceeding.
Step 1: Add a Condition Action
Insert a Condition control after the previous steps in the loop.
In the expression box, enter the following:
length(body('Send_an_HTTP_request_to_SharePoint')?['d']?['results'])
How it Works
The length() function checks the number of results returned by the HTTP request to SharePoint (the step that fetched the attachment).
If the result is greater than 0, it means a file exists, and the flow will continue to the next steps.
If the result is 0, it means no image is available for that record, and the flow will skip further processing.
Because this condition runs inside the loop, it automatically validates each record individually and ensures the flow only processes records that contain an image.

Step 2: Capture the File Path (ServerRelativeUrl)
Add a Compose action.
In the Inputs field, use the following expression to capture the file path:
body('Send_an_HTTP_request_to_SharePoint')?['d']?['results']?[0]?['ServerRelativeUrl']
This extracts the ServerRelativeUrl of the first attachment from the HTTP response.

Step 3: Capture the Original Image Name
Add another Compose action.
In the Inputs field, add the expression that retrieves the original image name from the SharePoint image column (fetched earlier in Section 2).
json(
first(body('Send_an_HTTP_request_to_SharePoint_1')?['d']?['results'])?['Photo']
)?['originalImageName']

Step 4: Get File Content Using Path
Add the SharePoint – Get file content using path action.
Select the Site Address of your SharePoint site.
For the File Path, use the following expression:
replace(outputs('Compose'), '/sites/VisitorManagement', '')

Step 4: Identify the Matching Record in Dataverse
Now that we have the image details and content from SharePoint, the next step is to locate the corresponding record in Dataverse where the image will be uploaded.
Add "List rows from selected environment " Action
Add a Dataverse – List rows action.
Select the appropriate Environment.
Choose the target Table name (for example, your Visitors table).

Apply a Filter to Match the Record
In the Filter Rows field, enter the following:
epic_visitorid eq '@{outputs('Title')}'
Here, epic_visitorid is the logical name of the Dataverse column that stores the visitor ID.

The operator eq means equals.
@{outputs('Title')} references the Compose action ( Title) from section -2 - step-3, which captured the SharePoint Title (unique visitor ID).
With this filter, the flow retrieves only the exact Dataverse record that matches the SharePoint visitor ID. This ensures the image is patched to the correct record without duplicates or mismatches.
Section 4: Upload File or Image to Dataverse
The final step in the flow is to upload the retrieved file content into the Dataverse table’s Image column.
Step 1: Add “Upload File or Image” Action
Add the Dataverse – Upload file or image action.
Fill in the required parameters as follows:
Environment → Select the target environment where your table is hosted.
Content Name → Choose the Original Image Name (captured in the earlier Compose action).
Table Name → Select the target Dataverse table (e.g., Visitors).
Row ID → Use the dynamic Row ID retrieved from the List rows action in Step 4.
Column Name → Select the target Image column (in this case, photo). Adjust based on your actual column name.
Content → Select the File Content from the Get file content using path action.

Once this step is configured, run the flow, and the image from SharePoint will be successfully uploaded to the corresponding Dataverse record.

That completes the end-to-end process of migrating a SharePoint list ( images) to Dataverse using Power Automate.
Comments