Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

AI Model - Extracting Data - Causing Duplicates in Sharepoint list - Check if File Exists before Extracting and creating item

(0) ShareShare
ReportReport
Posted on by 508

Hi All.,

I have a process where if a person moves contracts into our SharePoint Document library a process kicks off to extract key data out of the contract and it populates the SharePoint list.  What is happening is tha the user grabs the entire filder and moves it to SharePoint which is causing duplication of SharePoint items because the flow doesnt care if this has been already extracted.  Is there a way to have Flow Check to see if that file is already in SharePoint list before it kicks off this process.

VeeLearnMSFT_1-1664897042882.png

 

Here is my SharePoint list where the date is extracted as you can see I am capturing the file name that was picked up by flow to do the extraction.  Maybe this is a good way to check and make it stop if this file has already been abstracted?

 

Perhaps someone can add some advice if they have encountered this issue.

Thank you flow community.

 

VeeLearnMSFT_0-1664897019678.png

 

  • Verified answer
    VeeLearnMSFT Profile Picture
    508 on at
    Re: AI Model - Extracting Data - Causing Duplicates in Sharepoint list - Check if File Exists before Extracting and creating item

    I figured it out.  It was the internal name that was the issue.  When I changed to this it resolved all issues.

    Thanks for all your help @fchopo 

    VeeLearnMSFT_0-1665328643145.png

     

  • VeeLearnMSFT Profile Picture
    508 on at
    Re: AI Model - Extracting Data - Causing Duplicates in Sharepoint list - Check if File Exists before Extracting and creating item

    @fchopoI am having some trouble with the expression I think.  Can you kindly take a look where my issue is

    SharePoint Column:

    VeeLearnMSFT_3-1665163963094.png

     

     

     I am missing something.

     

    VeeLearnMSFT_2-1665231368534.png

     

    Error reported: 

    VeeLearnMSFT_1-1665231302801.png

     

     

     

     

     

    My entire flow:

    VeeLearnMSFT_1-1665163887110.png

     

    Just the top portion of my flow:

    VeeLearnMSFT_4-1665164181506.png

     

    Not sure how to resolve from here...

     

  • Verified answer
    fchopo Profile Picture
    7,972 Super User 2025 Season 1 on at
    Re: AI Model - Extracting Data - Causing Duplicates in Sharepoint list - Check if File Exists before Extracting and creating item

    Hi @VeeLearnMSFT 

    You could check whether an item with the same file name exists in the list or not before creating it:

    body-length.png

     

    1) When a file is created

    2) Get file metadata

    3) Get items where Document File Name equals name of the file

    4) If number of items is greater than 0 -> Item already exists in the list.

    5) If not -> Extract data using AI builder, etc.

     

    Hope that helps!

    Ferran

     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1