1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Workato:Google Driveコネクターを利用してGoogle Drive内のファイルを検索する

1
Posted at

Workatoでは、Google Driveコネクターを利用してGoogle Driveを操作することができます。
今回は、Google DriveコネクターによるGoogle Drive上のファイルやフォルダの検索手順について、以下の通りご説明します。

基本的な検索を行いたい場合

通常は「Search files or folders」アクションを利用します。

image.png

設定

image.png

Files or Folders

Files: ファイルを検索対象とします
Folders: フォルダを検索対象とします

Folder

検索先とするフォルダを指定します。未指定の場合は全てのフォルダが検索対象となります。

Name

検索したいファイルまたはフォルダ名を入力します。(部分一致)

その他のオプションについては、下記を参照ください。

詳細検索を行いたい場合

MIMEタイプを指定した検索を行いたい場合や、全文検索を行いたい場合等、より詳細な検索を行いたい場合は、カスタムアクションで対応します。

image.png

設定

image.png

Action name

任意の名称

Method

GET

Path

files

Response type

JSON response

Request URL Parameters

「Q」というSTRING型のフィールドを追加し、値(検索クエリ)をセットします。

image.png

検索クエリは、以下を参照ください。

Response body

「Use JSON」をクリックし、以下のJSONを利用して(コピー&ペーストして)スキーマを作成します。

{
	"kind": "drive#fileList",
	"incompleteSearch": false,
	"files": [
		{
			"kind": "drive#file",
			"id": "string",
			"name": "string",
			"mimeType": "string"
		}
	]
}

JSONを利用したスキーマの作成手順は、以下を参照ください。

なお、用途や条件によってはより多くのパラメータやスキーマが必要となる場合があります。
パラメータならびにレスポンススキーマのフォーマットの詳細は、以下を参照ください。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?