Binary files - filter by size

Hello,

If been wondering if there’s an easy way to filter binary files based on their size. I’m currently building something like an “archive” for a gmail account, and upload all attachments to Google Drive.

Since there are a lot of low-quality profile pictures or e-mail logos uploaded too, I wanted to ask if it’s possible to filter out every file that is less than a specific size (in my casw 20kb).

Thank you for your time

Hi @one_juru, this isn’t straightforward but should be possible. You can obtain the size of a file by reading the buffer length. Once you have this information available, you could then use an IF node to filer by size like so:

2 Likes

Hey @one_juru,
I adapted a workflow from this forum post Obtaining binary data size to send in upload session with Sharepoint Graph API - #2 by MutedJam to get a file’s size in kilobyte. Is this helping?

Example Workflow

2 Likes

Thank you both for your replys, it’s working pretty well now :slight_smile:

1 Like