...

Add Your Heading Text Here

In many business scenarios, data starts in Excel—especially when onboarding new clients or migrating legacy systems. But Excel lacks native relational capabilities like those found in Dataverse or SQL. This blog post walks you through how to:

  1. Structure two related tables in Excel (e.g., Customers and Orders).
  2. Upload them to OneDrive or SharePoint.
  3. Use Power Automate to read the data and create relationships in Dataverse or another system.

Step 1: Prepare Your Excel Tables

Let’s say you have two tables:

Customers Table

CustomerID Name Email
C001 Alice Smith alice@example.com
C002 Bob Jones bob@example.com

Orders Table

OrderID CustomerID Product Quantity
O1001 C001 Laptop 1
O1002 C002 Mouse 2
Important: Format both tables as Excel Tables using Insert > Table. Name them clearly (e.g., tblCustomers, tblOrders).

Step 2: Upload to OneDrive or SharePoint

Save your Excel file to a cloud location accessible by Power Automate:

  • OneDrive for Business
  • SharePoint Document Library

Step 3: Build the Power Automate Flow

Use “Manually trigger a flow” or “When a file is created” in OneDrive/SharePoint.

Use the “List rows present in a table” action twice:

  • First for tblCustomers
  • Then for tblOrders

Create record for the child records, in this case the order looks up to the customer, so create the customer table first.

Once you add the dynamic content this will create an ‘Apply to each’ loop to add each record to the dataverse table.

Next we need add a new row with the information from the orders

Dataverse uses a GUID to create the relationship. So to get the GUID of the created customer record we now need to do a lookup to find the record. We can do this using ‘List Rows’

We need to get the logical name from the table column so where the customer id, in this case the external ID matches the same as the Customer ID in the excel customer table

Now back in the ‘Add New Row’ for orders we can now add the relationship to the customer. Because we did a list rows and this could potentially be multiple records Power Automate will put the ‘Add New Row’ into an apply to each to loop through.

Select the unique identifier from the customer ‘List Rows’ record

To get only the first record and ovoid the apply to each the guide below will show how to get only the first record. Get First Value From Array In Power Automate | PowerTech365.

Now on the ‘Add New Row’ for orders we just need to pass in the unique identifier for the customer using the logical name

Follow Dataverse Lookup In Power Automate on how to get the logical name for lookup values

Final Result

Once the flow runs, you’ll see that the Customer lookup field is populated in the Orders table in Dataverse, establishing the relationship between the two records.

Like this post? Why not share it!

LinkedIn
WhatsApp
Facebook
Reddit
X
Email

View Our Other Articles

Get In Touch

Let’s talk. Send us a message, and we’ll help you explore the best Power Platform solution for your business

We can turn your mondain tasks into effective workflows, saving you and your business time and money

Seraphinite AcceleratorOptimized by Seraphinite Accelerator
Turns on site high speed to be attractive for people and search engines.