Loop action will allow us to run a loop with some data. This is to allow to leverage google sheet as a kind of middleware or to perform certain actions based on per row basis.
As example for each row in table, if col X = Y, delete row.
In @danfernandez case, he wanted to check if a row contains a Zip, and if its empty we want to delete it.
As you might have noticed by now, all our actions loop over the data. The playbook you describe can be constructed as:
Get table from Spreadsheet
Get rows from table
If Row.Column equals Value
Delete row from Spreasheet
(âGet rows from tableâ shouldnât be necessary, and wonât be necessary in the future, but itâs necessary now when using tables and conditional statements)
(We donât yet have a delete from Google Spreadsheet action, but the same would work for say, Coda or Airtable, for which we have the action)
The use case that Ivan describes is quite different, but Iâd like to understand yours first, and why you think itâs not solvable with the current primitives.
I have noticed that, but just to clarify the last action which is delete row does not exist so than this is currently not achievable with Google Sheets.
I am not sure what * Get rows from table does that is different from what Get table from Google Sheet does not. Does it return the data in a different way?
Further more âis emptyâ evaluator does not work in the conditional statements to check if a cell is empty.
The conditional does not have Yes OR No for each respective item, the last option you got runs both Yes AND No. So the flow cannot be controlled for each item in a table/array.
If I try not to delete the rows but just to add them to a different sheet it still does not work. I cannot access the data to write it.
I am not sure I fully understand the intention you guys have behind the conditional.
Here is the Book and Sheet. I would appreciate if you could create a short video with explanation how to achieve that and what I am doing wrong.
I am not sure what * Get rows from table does that is different from what Get table from Google Sheet does not. Does it return the data in a different way?
âGet rows from a tableâ takes one table with N rows and returns N tables with 1 row each. The tables are then processed individually by the conditional statement.
Further more âis emptyâ evaluator does not work in the conditional statements to check if a cell is empty.
I would expect that to return a YES.
The conditional does not have Yes OR No for each respective item, the last option you got runs both Yes AND No. So the flow cannot be controlled for each item in a table/array.
The conditional you show has âRun YES if at least one item matchesâ. Because at least one row is not empty, the YES branch runs for all rows. Thatâs not what you want.
In the vast majority of cases, youâll want âRuns both YES and NOâ. While the wording might be confusing, it means it runs the YES branch for the rows that match and the NO branch for the rows that donât match. In other words, itâs what you want here.
Yeah this is the behavior as implemented: both branches are run, with the portion of the data that passes / does not pass the filter. Because neither branch uses the data, both branches run identically.
I donât think this is intuitive, and neither it is quite the expected behavior.
I think we should change it so if some branch is completely empty, it is not executed at all, which should give the expected behavior in this case (only execute the Yes branch).
I appreciate that Bardeen does the looping internally. What my issue is that I would like to read a table from a Google sheet containing a column of URLs, then open the URLs one by one and grab some data from the page then re-insert it back to the Google sheet as the next column.
If I use Get rows from table, as you mentioned there will be N tables containing 1 row each. Say if I process each row and write the data back to the Google sheet, would it remember which row it is that it needs to write the new column entry on? If yes, could you give me an example of how this could be done? Much appreciated.
For your case you can simply use Get table from Google Sheets than use Scrape data in the Background to get the data you need and to add the data back to a different column withUpdate Google Sheet rows/tab rows