Update or append in Google Sheet

Hi,

How would you go about “upserting” in Google Sheet ? I’ve worked something out that I thought would work, but doesn’t seem to.

My idea was to get the list of existing ads’ urls, and comparing with an IF node (if the ad’s URL isn’t in the existing links, append, else, update)

Edit:

Here’s what I’ve got so far, which encounters two problems: somehow the first Split In Batches, if activated, makes the HTTP Request fail with "ERROR: Error: Invalid URI "/" RequestError: Error: Invalid URI "/"", but the execution parameters show that the URL passed to the Node is correct. If I disable the Split in Batches node the Workflow proceeds to fail with ERROR: Cannot access 'items' before initialization ReferenceError: Cannot access 'items' before initialization at the Select New Ads Function node, which references the Links to Array node.

@pec an you give example sheet?

After a lot of trial and error I’ve got something that works flawlessly, as far as I can tell! This is my first real workflow so there are probably things that could be done in more straightforward ways…
I’ve obviously removed IDs and references to my GSheet but if it can help someone trying to achieve something similar:

4 Likes

thank you for this!!!

1 Like

Got released with [email protected]