Search code examples
google-apps-scriptgoogle-docs

How Can I Get a Full List of Versions with Apps Script?


I am trying to get a full list of revisions/versions from a Google Doc's version history. Using the code provided by @Ben Gidley in his answer to How can I get the revision history in Google Docs using a script? I can get the "grouped versions" but I want all the versions.

Is this possible?


Solution

  • Unfortunately this is not possible and is an expected behavior of the API stated here: Changes and revisions overview


    Revision History

    A record of all revisions of a file in chronological order. A change to a Docs, Sheets, or Slides file gets a new revision. Each time the content changes, Drive creates a new revision history entry for that file. However, these editor file revisions may be merged together, so the API response might not show all changes to a file.