Scheduled workflow: "Generate CSV file" sometimes produces a CSV with only headers (0 rows)

Hi everyone,

Follow-up to my earlier thread: Scheduled workflow: generate one CSV from a table and send it once via API. The workflow works, but it fails intermittently and I can’t find a pattern.

Setup (scheduled workflow, every hour):

  1. Query “Clientes (activos)” → Loop → Generate CSV file → Call API (POST the file URL to my server)
  2. Query “Clientes (inactivos)” → Loop → Generate CSV file 2 → Call API

What happens

  • In 10 of the last 30 hourly runs, the active clients CSV came out with only the header row and no data rows (1,921 bytes). A normal one is ~943 KB, ~660 rows.
  • My server rejects the empty file, so Call API returns 400 and the run is marked as failed.
  • The inactive clients CSV (same table, ~2,500 rows, ~2.7 MB) came out fine in every one of those runs.
  • I changed nothing in the app between runs that work and runs that don’t. For example, on Oct 11 (UTC-5) the 10:05, 11:06, 17:05, 18:04, 20:05 and 21:05 runs failed, and the runs in between succeeded.
  • I downloaded the bad file hours later and it still had only the headers, so it isn’t a matter of reading it before Glide finished writing it.

Questions

  1. Has anyone seen “Generate CSV file” return 0 rows intermittently in a scheduled workflow?
  2. Could the query come back empty when the columns it filters on (computed columns) aren’t evaluated yet on the backend at run time?
  3. Is there a way to check the row count and retry before the Call API step, given that scheduled workflows have no Wait step?

Thanks!

I would add an IF block that checks the status of the Query (empty/not empty), and then only proceed with the Generate CSV step if the Query is not empty.