I am looking for the functionality described in this question and it's answers: Export Google Docs comments into Google Sheets, along with highlighted text?
However, when I run this code I get an error on this line:
Drive.Comments.list(docId).items;
GoogleJsonResponseException: API call to drive.comments.list failed with error:
The 'fields' parameter is required for this method.
I believe everything is set up just as described in the answers. I'm not sure what 'fields' parameter it's even referring to and can't find documentation related to this issue.
From your error GoogleJsonResponseException: API call to drive.comments.list failed with error: The 'fields' parameter is required for this method.
and the current specification, I guessed that the reason for your current issue might be due to that when Drive API is enabled now, Drive API v3 might be enabled instead of Drive API v2. So, please modify the following script you are showing.
If your version of Drive API is v3, please modify it as follows.
Drive.Comments.list(docId).items;
Drive.Comments.list(docId, { fields: "*" }).comments;
items
and comments
for v2 and v3, respectively. Please be careful about this.