Creating anchored comments programmatically in Google Docs

The Anchoring Comments feature from the Google Drive API is intended for non-Google Docs editors files, not for Google Documents. See https://youtu.be/ZBU52nacbLw?t=5m26s (credit to Bryan P who shared this URL through a comment)

Unfortunatelly at this time the Document Service from Google Apps Script doesn’t include a Class Comment to handle comments and discussions.

At the beginning of 2016 a feature request was posted through the Google Apps Scripts Issues and features requests official site. By starring this feature request you could help to make that Googlers put attention to it:

Issue 5650: Provide ability to create a Drive API Comment anchor resource as method on DocumentApp selection class

An older reference, posted on 2012, very similar but broader, referred through a comment by Alexander:
Issue 1618: Provide read/write access to comments in Google Docs

References

Leave a Comment