How to look up or create a column in Google Sheets
Is it possible to look up a column, or create if it doesn’t exist, similar to looking up a row?
When I set up a step to update a row the builder shows a pre-loaded set of columns. Not all my sheets will have these same columns. I would like to look up the column (similar to how you look up a row) and create one if it doesn’t exist.
You could use a Get Many Spreadsheet Rows (Advanced) action and set it to pull in only the first row of the spreadsheet which should contain the column names, for example:
Then you could have a filter check whether the Raw Rows field (that the Get Many Spreadsheet Rows action would output) contains a specific column name. And have aCreate Spreadsheet Column (Google Sheets) action add the missing new column.
If you give that a try and run into any trouble just let us know!