tr Skip to content
Nitin Yawalkar · August 12, 2026

“Is empty” doesn’t mean what you think — and your fallback never appears

“Discount:” and then nothing. A table header with no table under it. A gap where the gift message should have been.

Nobody gets an error. The workflow says success. The email just looks amateur.

This one is about the quiet day — the order with no discount, the digest with nothing in it.

The good news first

One thing already works before you touch anything: an empty array collapses the loop. Not into an empty row, not into a blank line — the whole for block renders as nothing.

And it does that whatever shape the emptiness arrives in:

  • the key is missing entirely → collapses
  • an empty string → collapses
  • [] → collapses
  • an actual empty array → collapses

So the rows are never your problem.

The header is

Your heading, your table header, your little “your items” line — those are separate blocks, sitting outside the loop. The loop vanishes. They do not.

That is the bare header. That is the email that looks broken. Those blocks need a rule of their own.

Watch it

The collapse, both traps, and two sends that look deliberate — in three minutes:

“Is empty” asks a narrower question than it sounds

It reads like a question about nothing. Is there anything here?

It isn’t. Is empty asks exactly one question: is this an empty string?

Trap one: an empty array is two characters

An empty array arriving from your workflow is text. Open bracket, close bracket. Two characters.

So it is not empty — and your “nothing today” message never appears. The loop collapsed, the fallback did not fire, and the email goes out with a heading and a hole under it.

Trap two: zero is one character

So you send a count instead. Zero items today, so the count is 0.

Zero is a character. One character. Not empty either. The block you wanted to hide stays; the message you wanted to show does not.

Both traps fail the same way — silently, on every send, until somebody notices the email looks odd.

The rule that actually holds

  • Don’t point Is empty at an array — an empty one is still two characters of text.
  • Don’t point it at a count — zero is still one character of text.
  • Point it at one variable that the workflow sets to your message when there is something to say, and leaves alone when there is not.

Then Is not empty shows the heading, the table and the total. Is empty shows one line instead.

empty_notice = "Nothing came through yesterday."   → the one-line version
empty_notice = ""                                  → heading + table + total

Both days

Tuesday: four orders. Heading in, rows in, total in, “nothing today” gone.

Sunday: nothing at all. One line. No heading with nothing under it, no header row over an empty table, no gap.

Same template. Same workflow. Both of them look deliberate — which is the whole difference between an email that is automated, and one that looks it.


New to FlowMattic? It’s the AI-native automation platform for WordPress — visual workflows, 800+ integrations, AI agents and a full builder suite, self-hosted inside your own dashboard. Get FlowMattic.