Skip to main content

Hello everyone,

 

I have a tricky task for a Google Sheet. I would like to create a master sheet which contains two columns a=a URL b=a date.

 

I use a web scraper that creates a CSV file with URLS that are published on a specific website at the time of the weekly (e.g. Mondays) scraping.

 

This means that the weekly CSV can differ as follows: 1. the entries can be 1:1 the same (if nothing has changed in the 7 days). 2. entries that were still present in the previous week may be missing. 3. there may be new entries that were not present in the previous week.

 

The master should now be filled via the Zap as follows:

For case 1: Do nothing (all URLs are already in the master)

For case 2: For the URLs that are no longer in the new list, set the date of the respective week in column B

For case 3: Add the new row to the master

 

I would create a loop for the individual URLs and use Loopup Spreadsheet row to recognise whether the URL is already in the master or not. I can then use Path to add the URL or not trigger an action if the URL already exists.

 

But how would I be able to edit the master if there were URLs in the master that are no longer in the new file? Can a path be ‘under’ another pathand how should it be configured?

 

 

Hi ​@humpi,

 

Welcome to the Community.

 

You're on the right track using Looping and Lookup Spreadsheet Row to process URLs individually. First, loop through the new CSV to handle missing URLs and check each URL against the Master Sheet. If it exists, skip it; if not, add it. For missing URLs in the Master Sheet, retrieve all existing URLs, compare them with the new CSV using Code by Zapier, and update missing entries. Since Zapier Paths work independently, nesting isn't possible. You'll need a separate Zap or code step to compare URLs.

 

I hope this helps. Please let me know if you have any other questions.
 


Hi ​@JammerS,

thank you for the quick response. 

Could you please specify what you exactly had in mind with “For missing URLs in the Master Sheet, retrieve all existing URLs, compare them with the new CSV using Code by Zapier, and update missing entries.”

 

I took that the transformation cannot take place in one zap. So I start by adding new rows to the master with zap one. 

Second zap then checks for missing rows and updates information in the master. I need code for that - if I dont know how the code looks like there is no sense in proceeding, right?

Best

Eike


Hi ​@humpi,

 

You’re right that this process requires two Zaps. The first Zap adds new rows to the Master Sheet, which seems to be set up correctly. The second Zap is more complex and involves using the Code by Zapier step to compare the URLs in the Master Sheet with those in the new CSV file, updating any missing entries in the Master Sheet.


Hi ​@JammerS,

I got your point. The first step could be created efforlessly. There even is a function in Google Sheets “Create Google Sheets Spreadsheet Row if it doesn’t exist yet?”. That made it easy to add new rows to the master. The Code step however does not seem to be possible for me. Even with ChatGPT I could not even slightly create a code that transforms the master as required. So if there is no other Action I could use, I guess I cannot achieve what I am looking for :-(

 

Best
Eike


Hi ​@humpi,

 

If you're unsure about using a Code step in Zapier, don't worry, as there are simpler options. The Zapier Formatter tool can handle many data transformations, such as text formatting, math operations, and date adjustments, without needing any coding.