How can I prevent duplicates from being added to a Google Sheet?

I’m feeling super dumb because I’ve been trying to figure this out for like 2 hours.

I have a google sheet with a column for URLs. I want to use this column as the trigger for starting the automation, however, I want to first check the existing list of URLs so this doesn’t start the automation if it already exists.

Trigger:
URL added to Google Sheets URL column (create/update)

Flow:

  • Use the new URL value to check for a match against the of URLs
  • If the URL exists already (>1 because I assume it would count the newly modified URL as well), clear the cell where the newly added item was made.
  • If it’s just 1, continue with the flow.

I’m really struggling here because I can’t figure this out. I need to count the matches.

How do I do this? It’s brainless in Make — you do a search on the google sheet for that URL in the column, and then you do a boolean branch out from there. If it’s true, and then you can do math to count the matches.

It doesn’t look like we can do basic math in Gumloop?

I eventually want to have sprawling flows that use this one check as a starting point, so I risk losing loads in API cost if I don’t have any guardrails up. Any help is appreciated.

Hey @afreymuth! If you’re reporting an issue with a flow or an error in a run, please include the run link and make sure it’s shareable so we can take a look.

  1. Find your run link on the history page. Format: https://www.gumloop.com/pipeline?run_id={your_run_id}&workbook_id={workbook_id}

  2. Make it shareable by clicking “Share” → ‘Anyone with the link can view’ in the top-left corner of the flow screen.
    GIF guide

  3. Provide details about the issue—more context helps us troubleshoot faster.

You can find your run history here: https://www.gumloop.com/history

Hey @afreymuth - This should definitely be possible with a custom node. You can set up a deduplicate node fairly easily using the AI within the custom node builder.

So just to confirm, there is a column or a separate list of existing URLs and the the column where the trigger is activated correct? The custom node can have two inputs:

  • Exisiting_URLs (Type = List)
  • New_URL (Type = Text)

The code can then check if the new url exists in the list of existing URLs and if it does output an error message or “N/A”. You can wrap this custom node around an IF-ELSE as well.

Let me know if this makes sense and works for you.

Doc: https://docs.gumloop.com/nodes/custom_node_details
Video Tutorial: https://www.youtube.com/watch?v=yHjxbmdg-cI&ab_channel=Gumloop
Custom Node Workshop: https://www.youtube.com/watch?v=ovCCWfgWv4M

Hi @Wasay-Gumloop,

Yes, I’ve looked at the custom node implementation, but the follow-up issue I have is that I can’t update a given cell based on a row number. The custom node can’t tap into my credentials and connect to Google sheets (I have a separate forum post about this).

I’ve got a custom node that iterates through the list looking for the match and then captures the index in that list (which would correspond to the Row ID in google sheets), but there’s no apparent way to search Google Sheets by Row ID to modify data in that row.

Ex. If someone adds a duplicate URL to a google sheet at Row 23, I can use the value of the cell that triggered it to check against a list of URLs pulled from that entire column, BUT after performing the check, there’s no way to go into a Google Sheets node and target the triggered cell and say “remove this specific entry”. Is there a method for doing that?

Got it. You can’t use Row ID with the current Google Sheet nodes but we do have a Google Sheet Updater node which uses a Search Value and Search Column to update an row. In your case the URL might not be a good search value since it can have duplicates, is there anything else on your spreadsheet that you can use to identify the row and update it?

Not really because any duplicate information I’d use to qualify this redundant row would be redundant intself.
Thanks for clarifying. Good thing I still have Make. I’ll have to split automations between the two. Discovering ups and downs on each.
Thanks @Wasay-Gumloop !

This topic was automatically closed 60 minutes after the last reply. New replies are no longer allowed.

Makes sense and no problem!