TL;DR. A userscript for Google Drive that transfers Google AI Studio prompts and attached media to another personal @gmail.com account without breaking File IDs, prompt MIME types, or Updated dates.
AI note. This script and this post were written with AI help. Because it runs on drive.google.com using your active session, read through the source on GitHub before installing if you want to check what it does.
Trying to move a few hundred Google AI Studio chats to a new Gmail account manually is a pain. If you download and re-upload the Google AI Studio folder, Drive saves the prompts as plain application/octet-stream files that AI Studio will not open, and the new File IDs break every image or attachment inside your chats. Sharing the folder in Drive does not transfer ownership of the files inside either. Even if you transfer ownership by hand, Google resets the Updated date on every prompt to today.
I put together a userscript that runs inside Google Drive and handles the transfer through Drive's internal v2 API.
How it works
- Install Violentmonkey or Tampermonkey and add the script.
- Open Google Drive on your old account, click the widget in the bottom right, enter your new email, and click "1. Send All". It merges duplicate
Google AI Studio folders in My Drive root, shares the folder, and sends pendingOwner invites on each prompt and attachment. - Open Google Drive on your new account. Check the Spam folder in the left sidebar first, because Google often puts newly shared folders there. If
Google AI Studio is in Spam, click "Not spam". - Open the widget (if both accounts are in the same browser, the old email fills in on its own) and click "2. Receive + Dates". It accepts ownership, reads each file's last revision timestamp to restore the original
Updated date, moves everything into the new account's Google AI Studio folder, and removes the empty old folder from "Shared with me".
The widget also has buttons for restoring dates on prompts that were already reset earlier, merging nested duplicate folders and trashing broken Binary copies (only when a working file with the same name is in the same folder), and removing the old account's access after you finish.
Things to know
Only personal @gmail.com accounts work. Google blocks ownership transfers between different Workspace domains.
Sending too many Drive API calls at once can trigger a security logout (HTTP 401 or a QR check). The script defaults to 3 threads with random delays and stops after 3 consecutive 401 errors. If Google logs you out, sign back in, refresh with F5, and run it again to pick up the remaining files. There is also a faster mode (6 to 8 threads) in the widget if you only have a small batch.
It runs with @grant none and only sends requests to clients6.google.com using your browser's Drive session. It does not talk to any external servers. Any duplicate folders or broken binaries cleaned up by the script go to Google Drive Trash, so you can restore them if needed.