# Prevent Duplicates while Creating or Updating Records using Power Automate Flow

Suppose you are setting up a Power Automate Flow for generating “New Account” records, and you want to find out if there are duplicate account records existing in your CRM system. Then, no worries, you can find duplicates using our action in Power Automate Flow.

Here’s how you can execute duplicate detection from Power Automate Flow. For the current scenario, we’re going to manually trigger the flow, but you can execute or trigger the same for all triggering stages of the flow.

<figure><img src="/files/NLYCzHsAARdccJ5Oprt5" alt="Creating or Updating Records using Power Automate Flow"><figcaption></figcaption></figure>

Inside the manual trigger flow, you will have to add the following inputs and entity details:

```
EnityDetails: {"Attributes":{"name":"jamal"},"EntityId":"","PrimaryIdAttribute":"accountid"}
PrimaryEntity: “account” 
MatchingEntity: “account”
```

<figure><img src="/files/e0TleJeqKHTHlMupQnB8" alt="Creating or Updating Records using Power Automate Flow"><figcaption></figcaption></figure>

Now you will have to perform an unbound action, for which you will have to select the following action **“ikl\_InogicDeDupeDGetDuplicateRecordsCount”** from the Action Name look-up and pass the following inputs:

**PrimaryEntityDetails:** EntityDetails

**PrimaryEntityName:** PrimaryEntity

**MatchingEntityName:** MatchingEntity

<figure><img src="/files/8yzTxWvaGrBrno5cZ2vZ" alt="Creating or Updating Records using Power Automate Flow"><figcaption></figcaption></figure>

Once the action is executed, it will provide a count of duplicate records. If the record count is less than 1, then the flow will create a new record in the account entity.

<figure><img src="/files/n80xJbVshjjaXt79bmF9" alt="Creating or Updating Records using Power Automate Flow"><figcaption></figcaption></figure>

Add your desired data inside the row for creating account records using Power Automate Flow.

<figure><img src="/files/ExH70agRwCHXdc1PhV9m" alt="Creating or Updating Records using Power Automate Flow"><figcaption></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inogic.com/deduped/features/duplicate-prevention/prevent-server-side-duplicate-records/prevent-duplicates-while-creating-or-updating-records-using-power-automate-flow.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
