Delete emails tied to specific email address

Hello! Everyone,
I am trying to build a work flow, to read email addresses from a google sheet. The goal is to be able to delete the emails from the mailbox that correspond to these emails.
I have gotten this far, as you can see in the workflow below. I am requesting help to write javascript to achieve what I have described above?

Hey, I don’t think there is a need to use code nodes in your case, you could just filter the mail you get with the mails you want to delete.

Here I delete all the mails from a specific sender that I have set in the set node (it would be the mail from the google sheet for you). Let me know if this helps ! :slight_smile:

Thank you very much. That helped.