Guide: Iterating Through Google Sheets with Make
Hi everyone!
I’m creating a workflow that will do some things based on some content in a Google Sheets spreadsheet.
Basically, I have an app that takes some pictures and uploads cells in a spreadsheet with the URL of the images hosted externally. The number of pictures taken however could be 1 to x amount.
I would like Make to perform some tasks based on each of the image URLs present in the sheet row - for example if a cell has contents with a string that ends in .JPG, then do something…
Is there a way to use the repeater or iterator tool to do this? I was thinking it should watch the spreadsheet row, and perform a task on any cell that has the value of .JPG
Solution
It’s a PITA when we can’t iterate through each column’s data as an array because the "Watch new rows” return each column as an item in the collection. If you don’t want to mess with if-elses, just use an iterator like this, and then filter out empty cells immediately following the iterator.
In the Iterator, you pass in a new array of the outputs using the add function:
Screenshot_2023-08-24_090852 [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/4/4b02510087fb9c848d3756cea27c665b21f7a98e.png]
(this is just an example, you can continue this to as many as required (… 1.`8` , 1.`9` , etc.). if a cell doesn’t exist it will just be an empty value)
then just add a filter before the next module
Screenshot_2023-08-24_090803 [https://europe1.discourse-cdn.com/business20/uploads/make/original/2X/e/eb3fcdba22c47eda6be744789b6d291b06108239.png]
This is AWESOME! Thank you! I have spent weeks on this!
You do have further questions?
Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.