Best practices for collecting emails?

65 views
Skip to first unread message

Woody

unread,
Jan 8, 2025, 1:34:08 PM1/8/25
to GAM for Google Workspace
Hey all, sometimes I get requests to search a user's email for a specific student or topic because they need to collect communication related to it for legal reasons or a meeting and the original user doesn't work for us anymore.

What best practices have you found for how to do this? In the past we've just given them access to the user's account or email delegate access, but I'm trying to see if there's a way to use GAM for this. Some things I've looked into so far:
  • Searching a user's email for a topic with the command and returning a spreadsheet showing the search results
    `gam user <email> print messages query '<queryText>' todrive`
  • Then they can tell me which messages they're interested in, I can grab the message IDs, and use the following command to see the contents of the email, but it shows the raw HTML of the email
    `gam user <email> print messages query 'rfc822msgid:"<messageID>"' showbody todrive` (or replace todrive with `> email.txt` to get a text file)
  • I've also tried forwarding the thread using this command, but I get an error
    Command: `gam user <email> forward threads to <recipientEmail> query 'rfc822msgid:"<messageID>"' doit
    Error message: `Forward Failed: 'ascii' codec can't encode character '\xa9' in position 62: ordinal not in range(128)`
Ultimately what I'm looking for is a way for me to easily pass it on to admin and say "here's all those emails you requested" in a format that makes sense to them, whether that's forwarded emails or a folder of PDFs. But they're not going to want to deal with seeing the raw code of an email.

Ian Crew

unread,
Jan 8, 2025, 1:43:04 PM1/8/25
to google-ap...@googlegroups.com
This is *exactly* what Google Vault is there for. And there are GAM commands that interact with Google Vault. See https://support.google.com/vault?hl=en&sjid=10628300155013516346-NC#topic=2739742 and https://github.com/taers232c/GAMADV-XTD3/wiki/Vault-Takeout for more.

Cheers,

Ian

--
Ian Crew

Architect, Communication and Collaboration Services
Productivity & Collaboration Services
Berkeley IT
University of California, Berkeley


--
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 visit https://groups.google.com/d/msgid/google-apps-manager/abff1966-e3bd-43db-93c9-17cb8737257bn%40googlegroups.com.

Jay Lee

unread,
Jan 8, 2025, 1:53:02 PM1/8/25
to google-ap...@googlegroups.com
+1 to Vault, use the right tool for the job.

Jay

Woody

unread,
Jan 8, 2025, 2:48:53 PM1/8/25
to GAM for Google Workspace
Thanks! I'll check out Vault.
Reply all
Reply to author
Forward
0 new messages