r/GoogleAppsScript • • Oct 20 '26

Question Is it possible to access Google Docs revision history ?

I can access the current document text through Google Docs and Drive API but I can only get the revision metadata and not the actual content.

Can I get the historical contents from the API itself or Can I use Google Apps Script to get that information?

4 Upvotes

6 comments sorted by

1

u/NinjaConsultingLLC Oct 25 '26

Google's documented route is Drive's revisions.get with fields=id,exportLinks, then download from the format-specific link returned for that revision. The text isn't embedded in the revision metadata itself. See the earlier-version export section.

1

u/Calcium_Man_ Oct 26 '26

Thank you so much . It worked

1

u/LabanauskasNajeeba 23d ago

Are you using v2 or v3 of the API? In v3 you have to explicitly pass the fields parameter to include exportLinks on the revisions endpoint, otherwise it just returns the bare minimum metadata like the ID and timestamp

-1

u/[deleted] Oct 21 '26

[removed] — view removed comment

1

u/Calcium_Man_ Oct 22 '26

Thanks for the reply but unfortunately time-driven trigger won't be useful for my case