Printing Messages

231 views
Skip to first unread message

Simon Smart

unread,
May 5, 2022, 8:51:12 AM5/5/22
to GAM for Google Workspace
Hello folks

Could you point out where I'm undoubtedly missing something obvious here please?

Trying to build a query for finding large emails so they can be tidied up for users with limited storage. Here's a sanitised example:

gam user us...@example.com print messages query “larger:10mb” todrive

Response: 'Got 0 Messages...'

Checking inside the account and running with the same query actually in the Gmail interface returns 1 email for the same query

Screenshot 2022-05-05 13.48.49.png

What have I done wrong here?

Cheers
Simon

Simon Smart

unread,
May 5, 2022, 8:58:00 AM5/5/22
to GAM for Google Workspace
PS I realise its 1 in the screenshot and 10 in the query... I tried both none returned results

Ross Scroggs

unread,
May 5, 2022, 10:25:44 AM5/5/22
to google-ap...@googlegroups.com
Simon,


Messages larger than a certain size in bytes
size:
Example: size:1000000
Messages larger or smaller than a certain size in bytes
larger:
smaller:
Example: larger:10M

Ross

--
You received this message because you are subscribed to the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-apps-man...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/ab82bc97-46e2-41cb-b9ae-3ee9a7a82546n%40googlegroups.com.

Simon Smart

unread,
May 5, 2022, 10:27:41 AM5/5/22
to GAM for Google Workspace
Hey Ross

Yep, I used that reference... so my query is simply "larger:1mb" 

In GAM it returns 0 results... but running the same query in Gmail itself returns 1 result

Jay Lee

unread,
May 5, 2022, 10:37:51 AM5/5/22
to google-ap...@googlegroups.com
The command you showed had:

larger:10mb

the help article shows:

larger:10M

try removing the b and capitalizing.

Jay

Jay Lee


Simon Smart

unread,
May 5, 2022, 11:22:11 AM5/5/22
to GAM for Google Workspace
Hey Jay

Still nothing using that either:

Screenshot 2022-05-05 16.21.06.png

Ross Scroggs

unread,
May 5, 2022, 11:24:24 AM5/5/22
to google-ap...@googlegroups.com
Simon,

Contact me dorectly via Meet/Zoom

On May 5, 2022, at 8:22 AM, 'Simon Smart' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Hey Jay

Still nothing using that either:

To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/df3bb9f9-e2ef-4142-88be-e128c85aae57n%40googlegroups.com.
<Screenshot 2022-05-05 16.21.06.png>

Ross Scroggs

unread,
May 5, 2022, 11:28:29 AM5/5/22
to google-ap...@googlegroups.com
Are the big messages in the trash? Add includespamtrash to the command

gam user us...@example.com print messages query “larger:10M” includespamtrash todrive

On May 5, 2022, at 8:22 AM, 'Simon Smart' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Hey Jay

Still nothing using that either:

To view this discussion on the web visit https://groups.google.com/d/msgid/google-apps-manager/df3bb9f9-e2ef-4142-88be-e128c85aae57n%40googlegroups.com.
<Screenshot 2022-05-05 16.21.06.png>

Simon Smart

unread,
May 5, 2022, 12:09:32 PM5/5/22
to GAM for Google Workspace
Hey folks

Thanks for your time Ross

So... I was building a guide for the person I'm passing this off to... Docs helpfully replaces quotes with curley quotes for us. This was pasted into GAM and GAM was parsing the curley quotes as part of the query.

I knew it must be something daft as GAM query gets passed off to the API

Anyway all working as expected now. And if anyone's wondering the API is happy with larger:10m, larger:10mb, larger:10M, larger:10MB etc its all good... just use the right quotes lol

Tip: Turn this off if you're making GAM documentation :D
Screenshot (1).png

Thanks Jay and Ross again for jumping on!
Reply all
Reply to author
Forward
0 new messages