Hello, I will try my best to make this as simple as possible.
I’m trying to build a “Lead generator” scenario by using Apify, and pumping new leads in my Google Sheets. Obviously I want to avoid duplicates, and I’m having issues trying to work with filters, to filter out duplicates. I have no coding background whatsoever, I’m sure this is easily solvable…
Initially, my scenario was as follows: Apify Run an Actor module > Apify Get Dataset Items > Google Sheets Create New Row. This worked fine, however I started getting duplicates which is normal.
So I tried using the “Google Sheets Search Rows” module (I’ve set it to extract information about a specific column, in this case my unique identifier is “Business names”) along with a filter which I’ve set to: If Google Sheets Data “Business names” is NOT EQUAL to new Apify actor data, then it passes.
Unfortunately this didn’t work the way it’s supposed to, duplicates still emerged because it seemed that the filter compared only ONE row of Google Sheets “Business Names” data to a new Apify data instead of the WHOLE column of business names. Make sense?
So I tried using an Aggregator. Set it to only aggregate the “business names”. Mapped it to the filter (compare array to new data) but now it compares data ONE BY ONE, meaning: every new Apify data is compared to only one “Business name” from my google sheets instead of the entire column. Resulting in hundreds of duplicates of the same row.
Hopefully this makes sense. I’d love to clarify if you have questions. Below are images/illustrations to help convey the issue I’m facing.
Also, I’m thinking maybe I should put the “Search Rows” module at the start because it’s eating up the amount of operations I have.
How do I fix this? Or how do I achieve what I want effectively?
Any help is much appreciated