Retrieve the action items with Comments: list specifying fields
as comments/replies/action
I agree with you that it is not straightfoward, but there is a way to retrieve the full comment content including action items.
Use Files:list specifying q
as fullText contains 'followup:actionitems'
, just as in the post you mentioned
For each of the retrieve items, use the fileId
for the method Comments: list
- For better understadning specify first the
fields
for Comments:list
as *
- this will return you the complete reponse looking as following:
{
"kind": "drive#commentList",
"comments": [
{
"kind": "drive#comment",
"id": "AAAAGlyxwAg",
"createdTime": "2020-06-08T09:04:34.907Z",
"modifiedTime": "2020-06-08T09:05:07.279Z",
"author": {
"kind": "drive#user",
"displayName": "XXX",
"photoLink": "//ssl.gstatic.com/s2/profiles/images/silhouette96.png",
"me": true
},
"htmlContent": "+\u003ca href=\"mailto:YYY@YYY.com\" data-rawHref=\"mailto:YYY@YYY.com\" target=\"_blank\"\u003eYYY@YYY.com\u003c/a\u003e Could you please check the spelling?",
"content": "+YYY@YYY.com Could you please check the spelling?",
"deleted": false,
"resolved": true,
"quotedFileContent": {
"mimeType": "text/html",
"value": "Hello"
},
"anchor": "kix.94ksxclyqix",
"replies": [
{
"kind": "drive#reply",
"id": "AAAAGlyxwAo",
"createdTime": "2020-06-08T09:05:02.999Z",
"modifiedTime": "2020-06-08T09:05:02.999Z",
"author": {
"kind": "drive#user",
"displayName": "YYY",
"photoLink": "//ssl.gstatic.com/s2/profiles/images/silhouette96.png",
"me": false
},
"htmlContent": "Will do!",
"content": "Will do!",
"deleted": false
},
{
"kind": "drive#reply",
"id": "AAAAGlyxwAs",
"createdTime": "2020-06-08T09:05:07.279Z",
"modifiedTime": "2020-06-08T09:05:07.279Z",
"author": {
"kind": "drive#user",
"displayName": "YYY",
"photoLink": "//ssl.gstatic.com/s2/profiles/images/silhouette96.png",
"me": false
},
"deleted": false,
"action": "resolve"
}
]
}
]
}
This response contains the following information:
- The quoted file content (the text to which the comment refers)
- The content of the initial comment and the replies
- The user to whom the comment was assigned
- The reply of the user including his user name
- And finally, the action taked by the user
- Now, if you are not interested in all fields but only in the action, you can see that
action
is a resources nested in comments/replies
- To query for
action
, replace the *
in fields
with comments/replies/action
as for your question about indexableText
, the documentation specifies that it is a property of contentHints
and
contentHints
Additional information about the content of the file.
These fields are never populated in responses.
A way to make indexableText
"useful" is e.g. apply it in queries like
Files:list
with q
: fullText contains 'indexableText'
The good new are that if you not happy with the way how actions are retrieved now and can think of a better method to implement it, you can file a Feature request on Google's Public Issue Tracker. If enough users show interest in the feature, Google might implement it in the future.