In this post, we’ll cover how to use the Encodian Flowr connector for Power Automate to automatically detect and remove duplicates from an Excel file (or CSV file).
The solution in this post and accompanying video is intended to cover basic capabilities rather than a real-world scenario. However, the core approach for detecting and removing duplicates can be re-used in any Power Automate flow regardless of where the Excel file is obtained or how the Flow is triggered.
Consider the following Excel file, which contains a duplicate attendee entry:
Let’s create a simple flow to remove the duplicate entry:
1. For this demo flow, I have created a manually triggered flow before retrieving the Excel file from OneDrive. But, of course, you can use any trigger action and obtain the file from any location supported by Microsoft Power Automate:
To remove the duplicates, we’re going to follow a three-step process, which are all performed with Encodan Flowr actions for Power Automate:
2. Add the Encodian ‘Get Rows from Excel‘ action
2.a File Content: Select the ‘File content‘ property provided by the OneDrive ‘Get file content‘ action
The Encodian ‘Get Rows from Excel‘ action will obtain all rows contained within the Excel or CSV file provided, returning as a JSON object.
3. Add the Encodian ‘Utility – Array Remove Duplicates‘ action
3.a Data: Select the ‘Row Data‘ property provided by the Encodian ‘Get Rows from Excel‘ action
The Encodian ‘Utility – Array Remove Duplicates‘ action will automatically detect and remove any duplicate entries contained within the JSON array provided.
4. Add the Encodian ‘Convert JSON to Excel‘ action
4.a Output Filename: Set the name of the file which will be generated
4.b JSON Data: Select the ‘Result‘ property provided by the Encodian ‘Utility – Array Remove Duplicates‘ action
The Encodian ‘Convert JSON to Excel‘ action will convert the de-duplicated JSON array to a new Excel document. An alternate approach to creating a new file would be to use the ‘Delete Rows from Excel‘ action to remove all data and then re-add the de-duplicated JSON data using the ‘Add Rows to Excel‘ action.
5. Add the OneDrive ‘Create File‘ action
5.a Folder Path: Set the location within OneDrive to store the new file
5.b. File Name: Select the ‘Filename‘ property provided by the Encodian ‘Convert JSON to Excel‘ action
5.c. File Content: Select the ‘File Content‘ property provided by the Encodian ‘Convert JSON to Excel‘ action
All Done! After executing the flow, the updated file added to OneDrive will show all duplicates removed:
We hope this post provides a helpful example of removing duplicate entries from Excel and CSV files using Encodian actions.
Please share any feedback or comments – all are welcome!
Search 150+ Actions to see how Flowr can save you time
Sign up for your free 30-day trial; no cards, catches, or contracts.
No job is too big or too small for our Professional Services team!
CEO