Hi. I haven’t set anything up yet and I’m hoping it’ll be relatively simple.
Is there a way of getting the Google Sheets app to pull a row from the top a sheet, then the next time it runs pull the next one day, and repeat until it reaches the end (or a blank row) at which point it starts back at the top?
This is an interesting question… The answer could partially depend on the data you are adding in the sheet. If there were 7 rows, you could pull row 1 on Sunday, 2 on Monday, etc. Or, you could use a datastore to keep track of the last row you got and get the next one (or if it was the last row get the first). You could create a “last pulled” column and search for either the first blank row (never pulled) or the one that is the latest (or has yesterday’s date) you would just need to update the row after to set today’s date.
More information required about the spreadsheet.
- Are the number of rows always fixed?
- Could the number of rows be reduced to a multiple of days in week (7, 14, 21, etc.)?
- What does each row in the spreadsheet contain?
- Have you explored other apps, other than Google Sheets? (Are you certain Sheets is the right tool for the job?)
No, the number of rows would gradually increase over time, and wouldn’t be a multiple of 7.
Depending on the use (we have different ideas), the row could contain a link to an article, a Dropbox folder, a team member’s name, etc.
I’m not certain that Sheets is the right tool but assumed it would be. Do you know of anything more suitable?
Hmmm really interesting, thank you. I wonder which method would be the simplest?
It wouldn’t be a set number of rows, and the rows would increase over time.
It would even work if the rows were selected at random, so long as they all were selected once before starting from the beginning.
Based on this, here is what I think I would do:
Create the rows with a column of “used” with a value of false in them.
Use the “Search Rows” Google Sheet module to find rows with false in the “used” column (return only 1 result)
Use the values from that row for whatever you are doing
Update that row with true in the used column
Add a router module after the Google Search Rows with two branches with filters. The first is if an item is found from your search and you go to to the rest of your scenario. The second is if no rows are found and then you would either email you to change all the values manually back to false, or search for all of them with a value of true and switch them back to false (will take more operations).
Genius! Thank you very much!