younifyd
Menu

Drive.comments.create

Creates a comment on a file.

POST/files/{fileId}/comments

Use it in a workflow

  1. Add a step and choose the Google Drive connector.
  2. Pick the Drive.comments.create action (under comments).
  3. Fill in the fields below, then reference the result from later steps as {{driveCommentsCreate.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.

Request body

Enter the body as JSON in the step's Body field.

anchorstring

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

authorobject

Information about a Drive user.

displayNamestring

A plain text displayable name for this user.

emailAddressstring

The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.

kindstring

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

Default "drive#user"

meboolean

Whether this user is the requesting user.

permissionIdstring

The user's ID as visible in Permission resources.

photoLinkstring

A link to the user's profile photo, if available.

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).

quotedFileContentobject

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.

mimeTypestring

The MIME type of the quoted content.

valuestring

The quoted content itself. This is interpreted as plain text if set through the API.

repliesarray<object>

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

actionstring

The action the reply performed to the parent comment. Valid values are: - resolve - reopen

authorobject6 fields

Information about a Drive user.

contentstring

The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.

createdTimestring (date-time)

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

deletedboolean

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

htmlContentstring

The content of the reply with HTML formatting.

idstring

The ID of the reply.

kindstring

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

Default "drive#reply"

modifiedTimestring (date-time)

The last time the reply was modified (RFC 3339 date-time).

resolvedboolean

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

json
{
  "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
}

Response

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

anchorstring

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

authorobject

Information about a Drive user.

displayNamestring

A plain text displayable name for this user.

emailAddressstring

The email address of the user. This may not be present in certain contexts if the user has not made their email address visible to the requester.

kindstring

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

Default "drive#user"

meboolean

Whether this user is the requesting user.

permissionIdstring

The user's ID as visible in Permission resources.

photoLinkstring

A link to the user's profile photo, if available.

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).

quotedFileContentobject

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.

mimeTypestring

The MIME type of the quoted content.

valuestring

The quoted content itself. This is interpreted as plain text if set through the API.

repliesarray<object>

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

actionstring

The action the reply performed to the parent comment. Valid values are: - resolve - reopen

authorobject6 fields

Information about a Drive user.

contentstring

The plain text content of the reply. This field is used for setting the content, while htmlContent should be displayed. This is required on creates if no action is specified.

createdTimestring (date-time)

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

deletedboolean

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

htmlContentstring

The content of the reply with HTML formatting.

idstring

The ID of the reply.

kindstring

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

Default "drive#reply"

modifiedTimestring (date-time)

The last time the reply was modified (RFC 3339 date-time).

resolvedboolean

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

json
{
  "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
}

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