audit_owned_files
Audits files owned by a specific user in a Google Drive folder to find items eligible for moving to a Shared Drive, and exports the list to a Google Sheet.
Instructions
Step 4 — Files owned by the migrating user.
Only files owned by the user can be *moved* (not just copied) to a
Shared Drive. This audit isolates those items.
Args:
user_email: The email of the user who owns the source folder.
folder_id: The ID of the source folder.
sheet_id: The ID of the Google Sheet for output.
sheet_name: The tab name (default: "own").
GAM command:
gam user <user_email> print filelist select <folder_id>
showownedby me
fields "id,name,mimeType,owners,modifiedTime"
filepath excludetrashed
todrive tdfileid <sheet_id> tdsheet "<sheet_name>"
tdupdatesheet tdretaintitle
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet_id | Yes | ||
| folder_id | Yes | ||
| sheet_name | No | own | |
| user_email | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |