younifyd
Menu

Drive.files.watch

Subscribes to changes to a file.

POST/files/{fileId}/watch

Use it in a workflow

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

acknowledgeAbuseboolean

Whether the user is acknowledging the risk of downloading known malware or other abusive files. This is only applicable when alt=media.

includeLabelsstring

A comma-separated list of IDs of labels to include in the labelInfo part of the response.

includePermissionsForViewstring

Specifies which additional view's permissions to include in the response. Only 'published' is supported.

supportsAllDrivesboolean

Whether the requesting application supports both My Drives and shared drives.

supportsTeamDrivesboolean

Deprecated use supportsAllDrives instead.

Request body

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

addressstring

The address where notifications are delivered for this channel.

expirationstring (int64)

Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.

idstring

A UUID or similar unique string that identifies this channel.

kindstring

Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".

Default "api#channel"

paramsobject

Additional parameters controlling delivery channel behavior. Optional.

payloadboolean

A Boolean value to indicate whether payload is wanted. Optional.

resourceIdstring

An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.

resourceUristring

A version-specific identifier for the watched resource.

tokenstring

An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.

typestring

The type of delivery mechanism used for this channel. Valid values are "web_hook" (or "webhook"). Both values refer to a channel where Http requests are used to deliver messages.

json
{
  "address": "string",
  "expiration": "string",
  "id": "string",
  "kind": "api#channel",
  "params": {},
  "payload": false,
  "resourceId": "string",
  "resourceUri": "string",
  "token": "string",
  "type": "string"
}

Response

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

addressstring

The address where notifications are delivered for this channel.

expirationstring (int64)

Date and time of notification channel expiration, expressed as a Unix timestamp, in milliseconds. Optional.

idstring

A UUID or similar unique string that identifies this channel.

kindstring

Identifies this as a notification channel used to watch for changes to a resource, which is "api#channel".

Default "api#channel"

paramsobject

Additional parameters controlling delivery channel behavior. Optional.

payloadboolean

A Boolean value to indicate whether payload is wanted. Optional.

resourceIdstring

An opaque ID that identifies the resource being watched on this channel. Stable across different API versions.

resourceUristring

A version-specific identifier for the watched resource.

tokenstring

An arbitrary string delivered to the target address with each notification delivered over this channel. Optional.

typestring

The type of delivery mechanism used for this channel. Valid values are "web_hook" (or "webhook"). Both values refer to a channel where Http requests are used to deliver messages.

json
{
  "address": "string",
  "expiration": "string",
  "id": "string",
  "kind": "api#channel",
  "params": {},
  "payload": false,
  "resourceId": "string",
  "resourceUri": "string",
  "token": "string",
  "type": "string"
}

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

Drive.files.watch — Google Drive — Documentation