I have a workflow that processes batch content from the OpenAI API. It follows these steps:
- Retrieves batch data.
- Checks if each request is completed.
- Inserts completed items into NocoDB.
- Once all items are inserted, it updates the table description to
"All batch completed"
. - When relaunching, the workflow checks if
"All batch completed"
exists to prevent reprocessing.
Issue:
If some batches are incomplete, they get skipped (which is fine), but the workflow still updates the table as "All batch completed"
. This prevents the incomplete batches from being processed when the workflow runs again.
What I Need:
I want to modify the logic so that the table description is only updated when all batches are truly completed. Specifically, if the total requested items ≠ completed items, it should not update the table description.