Report on all emails received by a group

2,108 views
Skip to first unread message

Cassie Danaher

unread,
Nov 10, 2021, 6:23:03 PM11/10/21
to GAM for Google Workspace
I am trying to pull a report that shows how many emails a specified group receives in a week.  I have been unsuccessful in accomplishing this through the google admin console.  Is there a way to do this through GAM? 

Brian Kim

unread,
Nov 11, 2021, 6:07:27 AM11/11/21
to GAM for Google Workspace
You can't access the group's messages using API, but you can use a group member's messages using Gmail API

gam user username print messages query 'listid:group.domain.com


If you have vault and message history turned ON for the group, you can use that to count message too.

Cassie Danaher

unread,
Nov 12, 2021, 12:56:01 PM11/12/21
to GAM for Google Workspace
This is the error I am getting.  ERROR: messages is not a valid argument for "gam <users> print"

Ross Scroggs

unread,
Nov 12, 2021, 1:02:43 PM11/12/21
to google-ap...@googlegroups.com

--
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/38be7ea6-63de-4afd-9f10-89fe41de3e5en%40googlegroups.com.


--

Danaher, Cassie

unread,
Nov 12, 2021, 1:03:27 PM11/12/21
to google-ap...@googlegroups.com
Awesome thank you. 

You received this message because you are subscribed to a topic in the Google Groups "GAM for Google Workspace" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-apps-manager/C1U9wPJnUPE/unsubscribe.
To unsubscribe from this group and all its topics, 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/CAJkvRS-vmrJQq11PPWtE1dJ-GY3h%2BA%3DTw3inNu-wqezQTg1fEg%40mail.gmail.com.
--
Thank you :)

Cassie Danaher
The "Other Stuff" Admin
Campus Computing and Information Technology

Ross Scroggs

unread,
Nov 12, 2021, 1:17:52 PM11/12/21
to google-ap...@googlegroups.com
Cassie,

The command you want is:

gam user us...@domain.com print messages query 'list:gr...@domain.com newer_than:8d' countsonly


Substitute for us...@domain.com and gr...@domain.com; user must be a member of the group.


Ross




--

Danaher, Cassie

unread,
Nov 18, 2021, 2:58:16 PM11/18/21
to google-ap...@googlegroups.com
When I tried to update it to advanced gam I broke it. I'm stuck spinning in circles at the same errors.  

HOSTNAME:.gam cdanaher$ gam info user
WARNING: Config File: /Users/cdanaher/.gam/gam.cfg, Section: DEFAULT, Item: cache_dir, Value: /Users/cdanaher/.gam/gamcache, Invalid Path
WARNING: Config File: /Users/cdanaher/.gam/gam.cfg, Section: DEFAULT, Item: oauth2_txt, Value: /Users/cdanaher/.gam/oauth2.txt, Not Found

ERROR: No Client Access allowed

Reply all
Reply to author
Forward
0 new messages