GAM - Show me all documents created in a specific OU and specific time frame.

21 views
Skip to first unread message

Gary Beamer

unread,
Mar 3, 2026, 3:35:02 PM (4 days ago) Mar 3
to GAM for Google Workspace
Hello,

I am looking for the specific command to show me all documents created within a certain OU and within a specific time frame.  Everything I have tried is not working.  Could someone provide me that code or point me in the right direction?

Ross Scroggs

unread,
Mar 3, 2026, 9:59:27 PM (3 days ago) Mar 3
to google-ap...@googlegroups.com

gam config auto_batch_min 1 num_threads 10 redirect csv ./OuFilesCreatedInTimeWindow.csv multiprocess sortheaders Owner,createdTime redirect stderr - multiprocess ou /Staff print filelist fields id,name,mimetype,createdtime query "createdTime >= '2025-03-01T00:00:00Z' and createdTime <= '2025-05-31T00:00:00Z'"


config auto_batch_min 1 num_threads 10 - Turn on parallel processing

# redirect csv ./OuFilesCreatedInTimeWindow.csv multiprocess sortheaders Owner,createdTime - Output file

# redirect stderr - multiprocess - Clean progress messages

# ou /Staff - Replace with actual OU

# print filelist fields id,name,mimetype,createdtime - Add additional fields as desired

# query "createdTime >= '2025-03-01T00:00:00Z' and createdTime <= '2025-05-31T00:00:00Z'" - Used actual start and end times


Ross

----
Ross Scroggs



On Mar 3, 2026, at 12:34 PM, 'Gary Beamer' via GAM for Google Workspace <google-ap...@googlegroups.com> wrote:

Hello,

I am looking for the specific command to show me all documents created within a certain OU and within a specific time frame.  Everything I have tried is not working.  Could someone provide me that code or point me in the right direction?

--
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/8d24919a-4c57-4c63-b4a5-b0a81d16630fn%40googlegroups.com.

Gary Beamer

unread,
Mar 4, 2026, 11:37:15 AM (3 days ago) Mar 4
to GAM for Google Workspace
Ross - This is awesome I was able to get this to pull. I would like some clarification if possible. This should pull any Google Docs, Google Sheets, Google Slides as well or do I need to perform something different?

Lt. Col. Marshall Giguere

unread,
Mar 4, 2026, 12:32:10 PM (3 days ago) Mar 4
to google-ap...@googlegroups.com
The command will pull all files of all mimetypes.  You can see the type be examining the mimetype field for each file.


Gary Beamer

unread,
Mar 4, 2026, 1:03:42 PM (3 days ago) Mar 4
to GAM for Google Workspace
Yes - I found my error. I was not paying attention to the time and the fact that I needed to add 5hours.  I was able to view everything. However, now I am rethinking my needs.

Let me ask it in another conversation.. The above commands worked for my needs, in case anyone reads this and has the same need.
Reply all
Reply to author
Forward
0 new messages