Pull report of one gmail label?

236 views
Skip to first unread message

CK

unread,
Oct 12, 2022, 3:54:54 PM10/12/22
to GAM for Google Workspace
I have run this command to show all labels and counts applied to messages:

gam all users print labels showcounts

But I'd like to see the usage of just a certain label. I can't get the right syntax.

Any suggestions?

Ross Scroggs

unread,
Oct 12, 2022, 4:03:54 PM10/12/22
to google-ap...@googlegroups.com
CK,

gam config csv_output_row_filter "name:regex:^PutLabelNameHere$"all users print labels showcounts

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/0b00c37a-346f-4aee-8473-706b92ee30b1n%40googlegroups.com.


--

CK

unread,
Oct 12, 2022, 4:27:19 PM10/12/22
to GAM for Google Workspace
Thanks a lot Ross. I'm running it now. I was hoping it would be faster than an all labels report, but it doesn't seem so.

Ross Scroggs

unread,
Oct 12, 2022, 4:38:47 PM10/12/22
to google-ap...@googlegroups.com
You can speed it up some by adding useronly to the command if it's a user label you're looking for.

Ross



--

Ross Scroggs

unread,
Oct 12, 2022, 4:49:59 PM10/12/22
to google-ap...@googlegroups.com
Is this a one-off issue or will this be a recurring process?

Ross



--

CK

unread,
Oct 12, 2022, 4:56:28 PM10/12/22
to GAM for Google Workspace
It's recurring. We need users to tag emails with this certain label and want to check compliance over the next few months. I'm a gam noob so not sure how to add useronly to the command?

Jay Lee

unread,
Oct 12, 2022, 5:00:57 PM10/12/22
to google-ap...@googlegroups.com
Is it an existing system label or one of Gmail's built in labels?

Jay

Ross Scroggs

unread,
Oct 12, 2022, 5:01:23 PM10/12/22
to google-ap...@googlegroups.com
gam config csv_output_row_filter "name:regex:^PutLabelNameHere$"all users print labels showcounts useronly

Ross



--

CK

unread,
Oct 12, 2022, 5:05:16 PM10/12/22
to GAM for Google Workspace
It's a label I pushed to all users with gam all users label "CERTAINLABEL"

Jay Lee

unread,
Oct 12, 2022, 5:08:07 PM10/12/22
to google-ap...@googlegroups.com
And what happens if the user decides to delete that label?

CK

unread,
Oct 12, 2022, 5:11:38 PM10/12/22
to GAM for Google Workspace
The label is being leveraged for a future project containing the tagged emails. If the user deletes the label, then they don't get the emails, and they lose out on their data being saved. 

Ross Scroggs

unread,
Oct 12, 2022, 5:39:33 PM10/12/22
to google-ap...@googlegroups.com
CK,

I'm working on this to allow you to select the labels:
gam all users print labels showcounts labellist "'LabelName1','LabelName2'"

Ross



--

Ross Scroggs

unread,
Oct 12, 2022, 8:31:05 PM10/12/22
to google-ap...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages