younifyd
Menu

Drive.comments.list

Lists a file's comments.

GET/files/{fileId}/comments

Use it in a workflow

  1. Add a step and choose the Google Drive connector.
  2. Pick the Drive.comments.list action (under comments).
  3. Fill in the fields below, then reference the result from later steps as {{driveCommentsList.response.data}}.

Request

Path parameters

fileIdstringrequired

The ID of the file.

Query parameters

altstring

Data format for the response.

One ofjson

fieldsstring

Selector specifying which fields to include in a partial response.

keystring

API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

oauth_tokenstring

OAuth 2.0 token for the current user.

prettyPrintboolean

Returns response with indentations and line breaks.

quotaUserstring

An opaque string that represents a user for quota purposes. Must not exceed 40 characters.

userIpstring

Deprecated. Please use quotaUser instead.

includeDeletedboolean

Whether to include deleted comments. Deleted comments will not include their original content.

pageSizeinteger

The maximum number of comments to return per page.

pageTokenstring

The token for continuing a previous list request on the next page. This should be set to the value of 'nextPageToken' from the previous response.

startModifiedTimestring

The minimum value of 'modifiedTime' for the result comments (RFC 3339 date-time).

Response

Returns 200 with an object. Read it in later steps with {{driveCommentsList.response.data.<field>}}.

commentsarray<object>

The list of comments. If nextPageToken is populated, then this list may be incomplete and an additional page of results should be fetched.

anchorstring

A region of the document represented as a JSON string. For details on defining anchor properties, refer to Add comments and replies.

authorobject6 fields

Information about a Drive user.

contentstring

The plain text content of the comment. This field is used for setting the content, while htmlContent should be displayed.

createdTimestring (date-time)

The time at which the comment was created (RFC 3339 date-time).

deletedboolean

Whether the comment has been deleted. A deleted comment has no content.

htmlContentstring

The content of the comment with HTML formatting.

idstring

The ID of the comment.

kindstring

Identifies what kind of resource this is. Value: the fixed string "drive#comment".

Default "drive#comment"

modifiedTimestring (date-time)

The last time the comment or any of its replies was modified (RFC 3339 date-time).

quotedFileContentobject2 fields

The file content to which the comment refers, typically within the anchor region. For a text file, for example, this would be the text at the location of the comment.

repliesarray<object>9 fields

The full list of replies to the comment in chronological order.

resolvedboolean

Whether the comment has been resolved by one of its replies.

kindstring

Identifies what kind of resource this is. Value: the fixed string "drive#commentList".

Default "drive#commentList"

nextPageTokenstring

The page token for the next page of comments. This will be absent if the end of the comments list has been reached. If the token is rejected for any reason, it should be discarded, and pagination should be restarted from the first page of results.

json
{
  "comments": [
    {
      "anchor": "string",
      "author": {
        "displayName": "string",
        "emailAddress": "string",
        "kind": "drive#user",
        "me": false,
        "permissionId": "string",
        "photoLink": "string"
      },
      "content": "string",
      "createdTime": "2025-01-01T00:00:00Z",
      "deleted": false,
      "htmlContent": "string",
      "id": "string",
      "kind": "drive#comment",
      "modifiedTime": "2025-01-01T00:00:00Z",
      "quotedFileContent": {
        "mimeType": "string",
        "value": "string"
      },
      "replies": [
        {
          "action": "string",
          "author": {
            "displayName": "string",
            "emailAddress": "string",
            "kind": "drive#user",
            "me": false,
            "permissionId": "string",
            "photoLink": "string"
          },
          "content": "string",
          "createdTime": "2025-01-01T00:00:00Z",
          "deleted": false,
          "htmlContent": "string",
          "id": "string",
          "kind": "drive#reply",
          "modifiedTime": "2025-01-01T00:00:00Z"
        }
      ],
      "resolved": false
    }
  ],
  "kind": "drive#commentList",
  "nextPageToken": "string"
}

Need more? See the Google Drive guide for connection setup and behaviour shared by every action.