Google Developer forums

Google Drive Detect File Changes

Hi,

We’re building a feature that allows offline syncing of all content under a specified folder from Google Drive to our application periodically, and we need to way to determine whether a file has changed and requires re-downloading.

We originally planed to use the file’s md5Checksum or sha256Checksum from the files.list API, but realized that checksums are not available for Google Drive native files.

We are now exploring other options to detect file change and are considering:

  1. Store and compare the file’s modifiedTimefrom the files.list API.
  2. Store and compare the file’s revision.id from the revisions resource.
  3. Use changes.list API → I believe this would return all changes relevant to the user or a particular drive. We only care about changes made under a particular folder and it seems like there is no good way to filter by folder ID easily.

Are 1 and 2 viable options to reliably detect file change across X period of time? Are modifiedTime and revision.id always updated together?

Thanks in advance!

Hey,

Hope you’re keeping well.

For Google Drive native files, checksums aren’t available, so modifiedTime and revisionId are the most practical metadata for change detection. modifiedTime will update whenever the file content or metadata changes, while revisionId updates for content changes but may remain the same for purely metadata edits. If you need to capture all changes including renames or moves, rely on modifiedTime.

The changes.list endpoint is the most reliable for incremental sync since it gives you a change token to resume from, but it doesn’t filter by folder directly—you’d need to post-filter results by parent IDs in your sync logic.

Thanks and regards,
Taz

This is super helpful! Thank you, Taz.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

Morty Proxy This is a proxified and sanitized view of the page, visit original site.