web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / list item duplicates v...
Power Automate
Answered

list item duplicates values based on when new email arrives based on subject values

(1) ShareShare
ReportReport
Posted on by 2,249

When new email arrives im extracting subject values and storing it in the list item 

Incoming email sample

Subject:USA,Client9

So if they are using same subject values but different attachments then it should update document library for the new attachment but at list item level it should not create new item as per below, so how to prevent duplicity in this context.

Veblitz_0-1721045396910.png

 

 

 

Flow details

Veblitz_1-1721045396902.png

 

 

Veblitz_2-1721045396887.png

 

 

How to prevent duplicates in the list item and in my case if the subject has same values then how to restrict those items 

Veblitz_3-1721045396914.png

 

 

set country variable expression:
last(split(outputs('Compose')[0],': '))
set customer variable expression:
last(split(outputs('Compose')[1],': '))

Veblitz_4-1721045396917.png

 

 

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    68,717 Most Valuable Professional on at

    If you don't want duplicates then you need to use Update Item to update the existing item instead of Create item to create a new one. So you need to check the subject against all the items to see if one matches before doing either the Create Item or Update Item.

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @Veblitz 

     

    Use "Get items" before "Create item" action, apply filter query in get items to check if item with customer & country already exists in it. You need to use odata query for both columns i.e. country & customer.

     

    Add "Condition" action to check the length of output array return by "Get items" action using an expression. If output contains any element then update item else if output is empty then create item.

     

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

     

  • Veblitz Profile Picture
    2,249 on at

    As per my above flow steps this is the complete flow details and i added get items as per your inputs and tested by sending same email subject but different attachments but in my flow duplicate items were not added which is correct but at the same time email attachment is different and that is skipped and so in my case its working No condition.so what i mean is that in my flow it work partially though your inputs were perfect but im not aware where to place get item actions logically in order to skip through this new issue where different attachment for the same email subject is ignored.

     

    Kindly advise

    Veblitz_2-1721048903863.png

    Veblitz_3-1721048944010.png

    Veblitz_4-1721048997243.png

    Veblitz_6-1721049131838.png

     

     

     

     

  • Veblitz Profile Picture
    2,249 on at

    I tried but no luck,

     

    here is my flow run history

     

    Veblitz_0-1721049944595.png

    Veblitz_1-1721049997230.png

     

    Veblitz_2-1721050069531.png

     

     

  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi,

     

    In no branch, you may compare the email attachments with attachment present in output of "Get items" action. Use "Get attachments" action from SharePoint connect and compare its name with attachment name in condition action. You need to use nested loop to perform the comparison. Use string or array variable to store the comparison result for each attachment. Post comparing, check string or array variable value and accordingly save attachment or email in document library.

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

     

  • Veblitz Profile Picture
    2,249 on at

    Okay.

    I will try the same but I'm not sure if I understood fully and what I mean partially is that how to use expressions inorder to compare get items attachments and get attachments actions values into an array variable .kindly shed some light.

  • Veblitz Profile Picture
    2,249 on at

    Thanks a lot for your awesome support and detailed information. Fantastic.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard