Data Import & Export

How to Prevent Power Automate from Copying Duplicate Excel Rows

Algirdas JasaitisAlgirdas Jasaitis Oct 21, 2026 869 views

Question details

The user needs to stop a scheduled Power Automate flow from repeatedly copying the same rows from a source Excel file into a destination table.

How to Prevent Power Automate from Copying Duplicate Excel Rows
Product
Power Automate, Microsoft Excel
Device & OS
not provided
Scenario
Running a scheduled Power Automate flow to copy Excel rows based on a specific static status (e.g., 'Yes').
Observed behavior
The flow repeatedly copies the exact same Excel rows during every scheduled run because it fails to track which records have already been processed and transferred.
Before you start

Ensure that your source and destination Excel tables are properly formatted with clear column headers, and confirm that your data is stored in standard Excel Tables (accessible via Insert > Table).

Solution 1Recommended

Use a Unique Key and Filter Query in Power Automate

Check if a row already exists in the destination table before creating a new one by comparing unique key identifiers.

This is the most robust method to prevent duplicates. By checking the destination table for an existing unique key before copying, you ensure that no identical records are created even if the flow runs multiple times.

1
Add a unique key column

In your source Excel file, ensure there is a column containing a unique identifier (like an ID number, invoice number, or combined text string) for every row.

2
Add a 'List rows present in a table' action

In your Power Automate flow, right before the step where you create a new row, add a 'List rows present in a table' action pointing to your destination Excel table.

3
Configure the Filter Query

In the advanced options of the 'List rows' action, write a Filter Query such as `IDColumnName eq 'UniqueIDFromSource'`. This searches the destination table for the current source row's key.

4
Set up a Condition

Add a 'Condition' action and check if the length of the outputs from the 'List rows' step is equal to 0. You can use the expression `length(outputs('List_rows_present_in_a_table')?['body/value'])`.

5
Create the row only if no match exists

Inside the 'If yes' branch (meaning no match was found), place your 'Add a row into a table' action to securely copy the row without duplicating.

Use a Unique Key and Filter Query in Power Automate
Reliable Transfer: This method prevents duplication regardless of the original row's status, ensuring a clean and accurate destination table.
Free Microsoft Office alternative

Use WPS Office as Your Powerful Data Management Alternative

While automated workflows require Microsoft's ecosystem, you can seamlessly handle, filter, and remove duplicates from your exported Excel data using WPS Office. It provides a lightweight, highly compatible environment for your daily spreadsheet tasks without the expensive subscription fees.

  1. 1. Download and Install: Download WPS Office for free from the official website and install it on your device.
  2. 2. Open Your Spreadsheets: Open your .xlsx files directly in WPS Spreadsheet with perfect formatting retention.
  3. 3. Manage Data Easily: Navigate to the Data tab to instantly use built-in 'Remove Duplicates' and 'Advanced Filter' features.
100% compatible with Microsoft Excel (.xlsx, .csv) formatsBuilt-in advanced filtering and data deduplication toolsLightweight and fast for handling large datasetsFree to download with a highly familiar user interface
microsoft office alternative - wps office

Frequently Asked Questions

Can I use Excel formulas to prevent Power Automate duplicates?

No. While formulas like =UNIQUE(FILTER(A2:D100,B2:B100="Yes")) can extract unique rows dynamically within the Excel worksheet itself, they do not prevent a scheduled Power Automate flow from reading and copying the original records multiple times. Duplicate prevention logic must be built directly into the flow.

Why is my Power Automate flow copying the same rows every day?

If your flow runs on a schedule and fetches data using a static condition (such as looking for rows where Status equals 'Yes'), it will pull those exact same rows every time it triggers. To fix this, you must either update the status to 'Copied' after transferring or verify if the record already exists in the destination table before copying.

How do I filter out empty rows in a Power Automate Excel flow?

You can prevent the flow from picking up empty rows by using a Filter Query in the 'List rows present in a table' action. Setting a query like `YourColumnName ne null` ensures that Power Automate only processes rows that contain actual data.