How to get LOGICAL_SIZE of a flex cluster from MongoDB Atlas Triggers

I asked the same question before here and somehow got a solution that time. But after the flex launch that solution is no longer working.
For any request I make, the result is always empty like this:

How do I fix it? Note: it is not a simple issue like granularity or period not set correctly. Already tried many variations of those values.

Hi there

is there a reason you. need disk use % and not the data size itself? If you get the data size itself, you can divide by 5GB to get the disk used %

I want to run a scheduled cleanup script for old files based on logical size %. But yes anything that gives me the logical size os ok as I can calculate stuff from there. But so far nothing is working.

Hi

What command are you currently using?

I am able to get the size in bytes for individual dbs using the mongo shell. If I connect to my db using the mongoshell, then run “use db_name”, then run “db.stats({scale:1})” it returns a list of parameters including the dataSize

No. I want to get this info from Triggers. And db.stats() does not work there.

Problem still not solved yet