cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

Create Dynamics 365 Leads from an Excel table - Flow is creating duplicate many records

I am making use of the "Create Dynamics 365 Leads from an Excel table". template. 

 

When the data is moved into CRM and creates a new lead record, each time the reoccurance runs it duplicates the lead records. 

 

How can I prevent the flow from creating duplicates and only adding a record when i create a new line of information in Excel?

 

Thanks for the help

Marcus

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Create Dynamics 365 Leads from an Excel table - Flow is creating duplicate many records

Hi @Anonymous,

 

Could you please share a screenshot of your flow's configuration?

Do you create your flow using the "Create Dynamics 365 Leads from an Excel table" built-in template?

 

I think there is something wrong with the "Create Dynamics 365 Leads from an Excel table" built-in template, please take a try to create your flow from scratch. I have made a test on my side and please take a try with the following workaround:

  • Add a "Recurrence" trigger, Interval set to 2 and Frequency set to Minute.
  • Add a "Get rows" action, specify File name and Table name.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@empty(body('Get_rows')?['value'])

 

  • Within "If/yes" branch of Condition, do nothing. Within "If/no" branch of Condition, add a "Apply to each" action, input parameter set to output of the "Get rows" action, within "Apply to each" action, add a "Create a new record" action, specify Organization Name and Entity Name.

         Under "Apply to each" action, add a "Apply to each 2" action, input parameter set to output of the "Get row" action, within "Apply to each 2" action, add a "Delete row" action, specify File Name and Table Name, Row id field set to Row id dynamic content of the "Get rows" action.

 

Image reference:5.JPG

 

6.JPG

The flow works successfully as below:7.JPG

 

 

More details about creating flow from scratch, please check the following article:

Create flow from scratch

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Highlighted
Community Support
Community Support

Re: Create Dynamics 365 Leads from an Excel table - Flow is creating duplicate many records

Hi @Anonymous,

 

Could you please share a screenshot of your flow's configuration?

Do you create your flow using the "Create Dynamics 365 Leads from an Excel table" built-in template?

 

I think there is something wrong with the "Create Dynamics 365 Leads from an Excel table" built-in template, please take a try to create your flow from scratch. I have made a test on my side and please take a try with the following workaround:

  • Add a "Recurrence" trigger, Interval set to 2 and Frequency set to Minute.
  • Add a "Get rows" action, specify File name and Table name.
  • Add a Condition, click "Edit in advanced mode", type the following formula:
@empty(body('Get_rows')?['value'])

 

  • Within "If/yes" branch of Condition, do nothing. Within "If/no" branch of Condition, add a "Apply to each" action, input parameter set to output of the "Get rows" action, within "Apply to each" action, add a "Create a new record" action, specify Organization Name and Entity Name.

         Under "Apply to each" action, add a "Apply to each 2" action, input parameter set to output of the "Get row" action, within "Apply to each 2" action, add a "Delete row" action, specify File Name and Table Name, Row id field set to Row id dynamic content of the "Get rows" action.

 

Image reference:5.JPG

 

6.JPG

The flow works successfully as below:7.JPG

 

 

More details about creating flow from scratch, please check the following article:

Create flow from scratch

 

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Highlighted
Administrator
Administrator

Re: Create Dynamics 365 Leads from an Excel table - Flow is creating duplicate many records

Hello, @Anonymous!

 

Have you had a chance to apply @v-xida-msft ‘s recommendation to adapt your Flow? If yes, and you find that solution to be satisfactory, please go ahead and click “Accept as Solution”.

 

Thank you for being an active member of the Flow Community!

 

-Gabriel

(Flow Community Admin)

-Gabriel
Microsoft Power Automate Community Manager
Are YOU a member of your local Power Automate User Group?
Fill out This Form to claim your Community User Group Member Badge!

Helpful resources

Announcements
firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

firstImage

Join the new Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

Top Solution Authors
Users online (7,622)