cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
MarcusDaytonas7
Level: Power Up

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
Community Support Team
Community Support Team

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

Hi @MarcusDaytonas7,

 

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
Community Support Team
Community Support Team

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

Hi @MarcusDaytonas7,

 

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

Administrator
Administrator

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

Hello, @MarcusDaytonas7!

 

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
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 344 members 6,692 guests
Please welcome our newest community members: