Quick question about moving messages from inbox to a label

58 views
Skip to first unread message

Cammie Clark

unread,
Aug 2, 2022, 8:54:45 PM8/2/22
to GAM for Google Workspace
Ran the following command (located on another thread, thanks Ross!):
gam csv User.csv gam user "~userEmail" modify messages query "to:~~userEmail~~ in:inbox" addlabel "ToMe" removelabel "INBOX" maxtomodify 1000000 doit

Worked like a charm. Mostly.

I completed some spot checks and can see that accounts still have some messages in their inbox––not many, just a random amount across the users, maybe 5-10 messages. I can't figure out what the reason is––perhaps the messages are marked important? Maybe the user has a split pane view?

Ross Scroggs

unread,
Aug 2, 2022, 9:13:38 PM8/2/22
to google-ap...@googlegroups.com
Cammie,

What if a message in the Inbox was sent to a group of which there are a members, then this part of the query wouldn't match: to:~~userEmail~~

--
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/c10e0706-efe3-4e15-8c7c-a8b2d9b9a563n%40googlegroups.com.

Cammie Clark

unread,
Aug 2, 2022, 9:44:59 PM8/2/22
to GAM for Google Workspace
Yep, that was it. 

Updated to:
gam csv User.csv gam user "~userEmail" modify messages query "to:email@domain in:inbox" addlabel "ToMe" removelabel "INBOX" maxtomodify 1000000 doit

Where "email@domain" is the group email I want archived from the inbox as well––worked perfect.

Thanks Ross 
Reply all
Reply to author
Forward
0 new messages