How to skip ChatGPT module if a cell in Google Sheet is empty

Hi all,

I use Google Sheet for storing facts about different places/products for a listicle blog post. There are 15 columns for 15 product/places.

For example: Cell A2 is a summary of facts of a book 1, B2 contains details of book 2, cell C2 contains details of book 3, etc.

The problem I have is every row has different number of products - sometimes there is a list of 10 products (10 cells used only and 5 are empty) and sometimes there can be all 15 cells used in a row.

I created workflow where 1st module is Google Sheets module and then there are 15 ChatGPT modules and the last one is Wordpress module. In my image there is only 5 for the illustration.

My question: If there are 10 products on a row, can I skip those cells 11-15 if there is no content? I want to skip cells 11-15 and send data from ChatGPT modules 1-10 to Wordpress. Is it possible to create logic to check if there is content in the cell? How?

There will always at least 1 product (at least 1 cell used every time). There can be up to 15 products (columns).

Thank you

Welcome to the Make community!

You’ll need to use an iterator to iterate through each row’s column cells, and then use a filter to ignore cells with empty data before the GPT module, then aggregate the results.

Something like this:

3 Likes