Check if PDF/Binary is empty node

Hello again,

Just a quick question, how can i have an if node but to check if the binary data is empty.


So i have a simple workflow which reads a spreadsheet creates HTTP requests using that data to download PDF files and saves them locally. So when the data is not correct it will still return a PDF file but it will be completely empty like this

So I just want a simple if node to check if that binary is empty and if so move onto the next item.??

after that I run the json data into an aggregate node and send a slack notifcation to users to tell them what was and wasnt successful, then create a new spreadsheet that has all the items and their subsequent PDF file paths. currently it is saving empty PDFs and lumps everything into the successful basket. it would be ideal to compile all the failed items and run a separate workflow to deal with those.

Describe the issue/error/question

What is the error message (if any)?

Please share the workflow

Share the output returned by the last node

Information on your n8n setup

  • Just updated to the latest version yesterday

Hey @Josh-Ghazi, I think a logic like this would let you check if a file has 0 Bytes:

Thank you so much this is exactly what I had in mind
Will try out and report back

it works really great! i changed it to 100b size and it seems to sort out perfectly. Thank you again!

1 Like

Glad to hear, thx so much for confirming!