Hi everyone,
I’m working on a Make.com scenario where I’m trying to deduplicate scraped leads against existing Google Sheets leads.
Here’s my current setup:
I have two clean primitive arrays already:
- CleanPrimitiveSheetEmails — extracted from Google Sheets (1047.Array), mapped “Email (E)”, cleaned with remove(emptystring, null).
- CleanScrapedEmailsExtracted — extracted from scraped leads (1044.Array), mapped email, also cleaned with remove(emptystring, null).
Both variables contain clean string arrays of emails like:
and
Goal :
Keep only the scraped leads whose emails do not already exist in the sheet list.
**What I’m trying to do ** :
I attempt to map() over 1044.Array like this:
map(
1044.Array;
if(
contains(
CleanPrimitiveSheetEmails;
email
);
emptyarray;
this
)
)
Then remove(emptyarray) after that.
Problem :
When I run this, all results come back empty inside the mapped output —
instead of getting just the fresh leads.
Important notes:
- Mapping email works properly separately.
- Primitive sheet emails are clean.
- contains() manual tests (e.g., contains(CleanPrimitiveSheetEmails; “”)) return expected results.
- No errors, just wrong output which should just be all of the items in array 1044
My suspicion :
Possibly this.email context inside the map is wrong, or maybe there’s some misbehavior in how the field is referenced during conditional mapping.
(I’m confused because sometimes in Make.com you reference fields raw vs using this. depending on context.)
Question:
How should the if(contains()) logic be properly structured inside a map() here?
Should I reference this.email, just email, or wrap with something else like get()?
Am I missing a subtle context switch inside map()?
Would love any guidance, sample code, or debugging advice —
happy to share screenshots of my scenario if needed too.
Thanks in advance for any help!