Deleting Duplicate Emails

Hi everyone,
Complete newbie here.
I’ve built a workflow that creates invoices for a customer using data from an email attachment. The issue I’m running into is that the email I’m extracting data from is sent automatically, and I always receive two identical copies.
Unfortunately, my customer can’t change this behavior, and I do need to receive both emails. The problem is that they are exactly the same — same subject, sender, recipient, content, attachment, etc. Because of this, when my workflow runs, it processes both emails and the invoice total ends up being double what it should be.
Since the emails are identical, I can’t figure out how to:
Ignore one of them, or
Delete one, or
Only extract data from a single email
There doesn’t seem to be anything I can use to tell them apart.
I’m still very new to n8n and automation in general, so if there is a solution, I’d really appreciate it being explained like I’m 5 :slightly_smiling_face:
Thanks so much for your help, and sorry if this has already been answered. I couldn’t find a similar situation, but feel free to link me to another topic if this has been covered before.

Hey also current beginner, I built something similar, from gmail I take the key from the email, and before extracting I have a if statement, I then check the google sheets or wherever you are extracting too to check if this key does not exist, if that is true I go ahead and append it to the google sheet if the key does exist nothing happens. This way I do not have duplicate emails.