How to Skip running a module if value present in DB?

I have the following flow that needs a bit of help:

The record returned initially contains a column that can have 1 to 3 values selected from the set [A, B, and C]. The repeater uses this to determine the loops through the rest of the flow. For each value in the set, it creates a new record, though ideally everything would be on the same record. I then run a pre-process step to return a result from ChatGPT. Now here’s the issue – I only want to do this once and have it stored in the database and applied to all the subsequent loops and have the result accessible to the paths after the router. The router paths have filters to determine what path needs to be run.

I can’t seem to figure out how to make this happen without having the pre-process step run again. I feel like I need an If/Then but not sure how I’d use it. Any advice would be really appreciated!

Hey @asmang

I might be confused about what’s coming in/out from Airtable — could you possibly add a screen shot of the relevant columns/tables (the input 1,2,3 column and the second table that your creating 1,2, or 3 rows into; and do you want to create an output column value in the first table at the end?)

Nic

Thanks for your question. Here’s an example of the table:

Fields:

  • ID - just the record id of the current row
  • Record Value - comes from another table and is referenced in from the Airtable step after the repeater. This record also contains a field with the A, B, and C array that the repeater goes through in the first Airtable step to see which needs content generated
  • Pre-process doesn’t actually exist in the live table yet but my hope is to have that for the particular ID such that the same pre-process text gets used for whichever of A/B/C are selected
  • A/B/C columns hold the value.

In case this helps, the use case is to store quiz information for different classes. The record holds the class topic (ex: biology, math, etc. – making it for my kids to help study). The Pre-process will read in the record (9th grade biology, 4th grade math, etc.) and generate some instructions for how to word things.

The A/B/C could be flash cards, fill-in-the-blank, essay questions, etc. It would then write out values into those fields for whatever was selected and use the pre-processing rules to develop them. Output would be a set of study resources.