Retrieving Google Docs suggestions using only Google Apps Script

I’m working on a project where I need to detect if there are any suggestions in a Google Document using Google Apps Script. I’ve seen some solutions online that mention making GET requests to retrieve document suggestions, but most examples I find are written in Java or Python.

I specifically need to accomplish this task using only Google Apps Script without any external libraries or other programming languages. My goal is simple - I just want to check if suggestions exist in the document, not necessarily modify or respond to them.

Can anyone guide me on how to access Google Docs suggestions through the Google Apps Script API? What would be the correct approach to retrieve this information programmatically?

What you’re trying to do hits a common frustration point with Google Apps Script. The DocumentApp class simply does not expose suggestion data through its standard methods like getBody() or getText(). I discovered this the hard way when building a document review system about six months ago. The issue is that suggestions are stored as revision metadata rather than document content, which is why they’re invisible to the typical Apps Script document methods. Your best bet is indeed using UrlFetchApp to call the Google Docs REST API directly. You’ll need to construct requests to https://docs.googleapis.com/v1/documents/{documentId} with proper OAuth headers obtained through ScriptApp.getOAuthToken(). The response includes a suggestedChanges object that contains all pending suggestions. Be prepared to handle some fairly nested JSON structures when parsing the results. The authentication setup can be tricky initially, but once configured it works reliably for detecting suggestion presence without needing external tools.

just dealt with this same issue last month! the docs api route through urlfetchapp is really your only option since documentapp completly ignores suggestions. one thing to watch out for - make sure you enable the right scopes in your script manifest, othewise the oauth token wont have permissions to read suggestion data.

Unfortunately, Google Apps Script’s DocumentApp service doesn’t provide direct access to suggestions through its API. The suggestions feature operates at a different layer than what’s exposed to Apps Script developers. I ran into this limitation myself when trying to build an automated review workflow last year. The workaround I eventually used was leveraging the Google Docs API v1 through UrlFetchApp. You can make authenticated requests to the API endpoint using ScriptApp.getOAuthToken() for authorization. The key is using the suggestionMode parameter in your requests to retrieve suggestion data. However, this requires enabling the Google Docs API in your Google Cloud Console project and handling the JSON responses manually. While it’s still technically “only” Apps Script, you’re essentially making REST API calls rather than using the built-in DocumentApp methods. The implementation gets somewhat complex when parsing the response structure, but it’s definitely achievable without external dependencies.