Skip to content

Commit a56f944

Browse files
committed
drive
1 parent 4b0175f commit a56f944

File tree

2 files changed

+340
-0
lines changed

2 files changed

+340
-0
lines changed
Lines changed: 339 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,339 @@
1+
# Google Drive Integration
2+
3+
This page provides information on how to connect to Google Drive. It enables users to perform actions such as managing files and folders, exporting documents, and performing custom actions.
4+
5+
## Connect Google Drive
6+
7+
To connect to Google Drive, users must authenticate through OAuth 2.0, obtaining access and refresh tokens to interact with the Google Drive API securely. Follow the Google Drive API documentation for setting up the authentication process and acquiring the necessary permissions.
8+
9+
## Query Google Drive
10+
11+
The following section provides a **reference guide** describing available commands and their parameters.
12+
13+
14+
15+
### Drive Get File By Id
16+
17+
Retrieve a file's metadata and optionally its contents using the file's unique identifier.
18+
19+
#### File Id `string`
20+
21+
<dd>
22+
23+
This property represents the unique identifier of the file you wish to retrieve from Google Drive. It is a required field without which the command cannot pull any file data. File IDs are strings typically resembling `"1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms"`. You can locate a File ID in the file's URL in Google Drive.
24+
25+
*Example*:
26+
27+
```
28+
1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
29+
```
30+
31+
</dd>
32+
33+
#### Additional Fields `JSON object`
34+
35+
<dd>
36+
37+
Specify additional metadata fields to retrieve in a JSON format. If omitted, only default metadata fields will be returned. Use this property to enrich the returned data based on your workflow needs.
38+
39+
*Example*:
40+
41+
```
42+
{"fields": "id, name, mimeType"}
43+
```
44+
</dd>
45+
46+
#### Include File Contents `boolean`
47+
48+
<dd>
49+
50+
Indicates whether to include the actual file contents in the response. Accepts a boolean value—`true` to include contents and `false` otherwise. Defaults to `false` if not specified.
51+
52+
53+
</dd>
54+
55+
56+
57+
### Drive Save File
58+
59+
Upload and save a file to Google Drive with options to specify its location and sharing settings.
60+
61+
#### File `binary`
62+
63+
<dd>
64+
65+
This is the actual file data you want to upload. The command requires this property, accepting files in binary format.
66+
67+
*Example*:
68+
69+
70+
71+
72+
</dd>
73+
74+
#### Parent Id `string`
75+
76+
<dd>
77+
78+
Specify the ID of the parent folder where the file should be saved. Defaults to the user's root folder if this field is left blank. Folder IDs are strings similar to file IDs.
79+
80+
81+
</dd>
82+
83+
#### Shared Drive `boolean`
84+
85+
<dd>
86+
87+
Indicate whether the target location is a shared drive. Accepts a boolean value; if `true`, the upload is directed to a shared drive. Defaults to `false` if unspecified.
88+
89+
90+
</dd>
91+
92+
#### Filename `string`
93+
94+
<dd>
95+
96+
Specify a name for the uploaded file. If left blank, it defaults to the original file name. Use this property to rename the file upon saving.
97+
98+
*Example*:
99+
100+
```
101+
report_2023.xlsx
102+
```
103+
</dd>
104+
105+
#### Additional Fields `JSON object`
106+
107+
<dd>
108+
109+
Include any additional fields to update in the file metadata using a JSON object. This is optional and caters to specific operational needs like setting custom properties.
110+
111+
*Example*:
112+
113+
```
114+
{"description": "Quarterly financial report"}
115+
```
116+
</dd>
117+
118+
119+
120+
### Drive Export Doc
121+
122+
Export a Google Document to a specified MIME type format.
123+
124+
#### File Id `string`
125+
126+
<dd>
127+
128+
The unique File ID of the Google Doc you want to export. This field is necessary for exporting and is located in the document's URL.
129+
130+
*Example*:
131+
132+
```
133+
1s3f4Lgpbhf6NzlMquqc-8dvK7WMbH
134+
```
135+
136+
</dd>
137+
138+
#### Mime Type `string`
139+
140+
<dd>
141+
142+
A string representing the desired export format. Common values include `"application/pdf"` for PDFs or `"application/vnd.openxmlformats-officedocument.wordprocessingml.document"` for Word documents.
143+
144+
145+
</dd>
146+
147+
148+
149+
### Drive Create Folder
150+
151+
Create a new folder in a specified parent directory within Google Drive.
152+
153+
#### Folder Name `string`
154+
155+
<dd>
156+
157+
Provide a name for the new folder. This field is mandatory and must be a string value.
158+
159+
160+
</dd>
161+
162+
#### Parent Id `string`
163+
164+
<dd>
165+
166+
The ID of the parent folder where the new folder will be created. If left unspecified, the folder is created in the user's root directory.
167+
168+
*Example*:
169+
170+
```
171+
1Ks8yUhqKNZ7z8g7GNqYt1_e9RUwhb6cQ
172+
```
173+
174+
</dd>
175+
176+
177+
178+
### Drive Delete Folder
179+
180+
Remove a folder from Google Drive by its identifier.
181+
182+
#### Folder Id `string`
183+
184+
<dd>
185+
186+
Represents the unique ID of the folder to be deleted. This identifier is crucial for executing the delete operation successfully.
187+
188+
189+
</dd>
190+
191+
192+
193+
### Drive Get Folder By Id
194+
195+
Retrieve metadata for a specific folder using its identifier.
196+
197+
#### Folder Id `string`
198+
199+
<dd>
200+
201+
The folder's unique identifier, which is necessary for fetching its metadata. It follows a specific format available in the folder's URL.
202+
203+
204+
</dd>
205+
206+
207+
208+
### Drive Move Folder
209+
210+
Change the parent location of a folder within Google Drive.
211+
212+
#### Folder Id `string`
213+
214+
<dd>
215+
216+
The ID of the folder you intend to move. This identifier is required to accurately perform the move operation.
217+
218+
219+
</dd>
220+
221+
#### Parent Id `string`
222+
223+
<dd>
224+
225+
Designate the target parent ID to which the folder will be moved. Without this, the command defaults to attempting to move it to the root directory.
226+
227+
228+
</dd>
229+
230+
231+
232+
### Drive List Files
233+
234+
Retrieve a list of files from a specific directory with optional inclusion of folders.
235+
236+
#### Include Folders `boolean`
237+
238+
<dd>
239+
240+
Specify if folders should be included in the result. Accepts `true` or `false`. Defaults to `false`.
241+
242+
243+
</dd>
244+
245+
#### Parent Id `string`
246+
247+
<dd>
248+
249+
Provide the parent folder ID to list files from that directory. Defaults to listing files from the user's root folder if left blank.
250+
251+
252+
253+
</dd>
254+
255+
#### Page Size `integer`
256+
257+
<dd>
258+
259+
The maximum number of files to return per page, supporting values between 1 and 1000. Defaults to 100 if not specified.
260+
261+
262+
</dd>
263+
264+
#### Include Shared Items `boolean`
265+
266+
<dd>
267+
268+
Indicate whether to include files from shared drives in the result. By default, this is set to `false`, excluding shared files.
269+
270+
271+
</dd>
272+
273+
#### Additional Fields `JSON object`
274+
275+
<dd>
276+
277+
Specify any additional metadata fields to include in the response via a JSON structure. Omitting this will return standard metadata fields.
278+
279+
*Example*:
280+
281+
```
282+
{"fields": "id, name, owners"}
283+
```
284+
</dd>
285+
286+
287+
288+
### Drive Search Folders
289+
290+
Search for folders within a specified parent or shared drive using filters.
291+
292+
#### Parent Id `string`
293+
294+
<dd>
295+
296+
The parent folder ID within which to conduct the folder search. Critical for scoping the search to specific directories.
297+
298+
299+
</dd>
300+
301+
#### Drive Id `string`
302+
303+
<dd>
304+
305+
Specify a Drive ID to search inside shared drives, especially useful for shared environments. Represents the unique identifier of the shared drive.
306+
307+
*Example*:
308+
309+
```
310+
0AFEN07KuPJfUk9PVA
311+
```
312+
</dd>
313+
314+
#### Page Size `integer`
315+
316+
<dd>
317+
318+
Defines how many folders to return per page, allowing values from 1 through 1000. Defaults to 100 when omitted.
319+
320+
321+
322+
</dd>
323+
324+
#### Filter Formula `string`
325+
326+
<dd>
327+
328+
Set a filter formula to refine search results, expressed in logical syntax like `var1 = "val1"`. This field narrows results based on specified conditions.
329+
330+
*Example*:
331+
332+
```
333+
var1 = "Project", var2 < "2023-12-31"
334+
```
335+
336+
</dd>
337+
338+
339+

website/sidebars.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ const sidebars = {
324324
'connect-data/reference/aws-lambda',
325325
'connect-data/reference/querying-google-sheets',
326326
'connect-data/reference/google-calendar',
327+
'connect-data/reference/google-drive',
327328
'connect-data/reference/github',
328329
'connect-data/reference/hubspot',
329330
'connect-data/reference/jira',

0 commit comments

Comments
 (0)