Describe the problem/error/question
I’m fetching data from RSS and I want to filter to list files under 5GB. How can I do this? cause the RSS has a mix of measurements as it contains MiB & GiB
What is the error message (if any)?
Please share your workflow
Share the output returned by the last node
Information on your n8n setup
- n8n version: 2.7.5
- Database (default: SQLite): default
- n8n EXECUTIONS_PROCESS setting (default: own, main): default
- Running n8n via (Docker, npm, n8n cloud, desktop app): npm
- Operating system:
The trick is just getting both sizes into the same unit before you compare them — MiB to GiB is a simple divide by 1024.
In an n8n Filter or Code node, something like this does the job:
const size = $json.size; // “700 MiB” or “4.8 GiB”
const match = size.match(/([\d.]+)\s*(MiB|GiB)/i);
const value = parseFloat(match[1]);
const unit = match[2].toLowerCase();
const sizeInGiB = unit === ‘mib’ ? value / 1024 : value;
return sizeInGiB < 5;
Basically: convert MiB to GiB, then just filter out anything under 5 GiB.
good day @Ruriko
I’d first check the shape of the RSS output, because in your sample the torrents are inside rss.channel.item and the size field is named nyaa:size, not size. So before the Filter node, make sure each entry is split into its own n8n item, then filter using that exact field. Once each torrent is an item, the comparison becomes simple: convert GiB to MiB by multiplying by 1024, keep MiB as is, and compare the result with 5120.
Hi @Ruriko , this is the sample output. Thanks