Google Drive Connector - Source Code
<?xml version="1.0" encoding="utf-8"?>
<ApiConfig Name="Google Drive"
Desc="Read / write Google Drive data inside your app; perform many Google Drive operations without coding, just using easy to use high performance API Connector for Google Drive"
Slug="google-drive-connector"
Id="172fd7a0-c14a-4e6b-9309-b9d69ec5bb07"
Logo="data:image/png;base64,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"
Version="5"
EngineVersion="4"
>
<VersionHistory>
<Change Type="Modified" Date="2023-04-13">Added HelpLinks all the endpoints</Change>
<Change Type="Modified" Date="2022-09-15">Added new endpoint export_file. Using this endpoint, you can export/convert various Google editor document types (e.g. Documents, Spreadsheets, Drawings, Presentations, Apps Scripts ) to known file formats (e.g. HTML, PDF, Excel, Text, PowerPoint) .</Change>
<Change Type="Modified" Date="2022-09-06">Updated endpoint to display the search criteria by default, added the pagination for files,folder list endpoints .</Change>
<Change Type="Modified" Date="2022-01-11">Changed Update endpoint to update files by using chunk method.</Change>
<Change Type="Modified" Date="2022-01-11">Changed File select operation to list files rather than download operation (BREAKING CHANGE!).</Change>
<Change Type="New" Date="2022-01-11">Added select operation for Trash table.</Change>
<Change Date="2022-01-10">Added support for uploading large files using chunked upload (handle more than 200MB).</Change>
<Change Date="2022-01-10">Change Minimum EngineVersion to 4 (from 3).</Change>
<Change Date="2021-10-06">Added parameters to Upload File endpoint.</Change>
<Change Date="2021-09-18">Change Minimum EngineVersion to 3 (from 2).</Change>
<Change Date="2021-09-15">Updated how params are used with UseCustomApp. Added new Authentication type - ServiceAccount. Added "delete_all_items" endpoint.</Change>
<Change Date="2021-08-23">Initial version</Change>
</VersionHistory>
<ServiceUrls>
<ServiceUrl Name="https://www.googleapis.com/" Url="https://www.googleapis.com/" />
</ServiceUrls>
<Auths>
<Auth Name="OAuth" Label="User Account" HelpLink="https://zappysys.com/links/?id=10002"
Type="OAuth" ConnStr="Provider=GoogleSheets;ScopeSeparator={space};RetryMode=[$RetryMode$];RetryStatusCodeList=[$RetryStatusCodeList$]"
TestEndPoint="get_about"
>
<Notes>
<![CDATA[
<p>To make this work you will have to create an OAuth application. To register an App, perform the following steps (Detailed steps found in the help link at the end):<p />
<ol>
<li>Go to <a target="_blank" href="https://console.developers.google.com/">Google API Console</a></li>
<li>From the Project Dropdown (usually found at the top bar) click Select Project</li>
<li>On Project Propup click <b>CREATE PROJECT</b></li>
<li>Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown)</b></li>
<li>Click <b>ENABLE APIS AND SERVICES</b></li>
<li>Now we need to enable Google Drive API.</li>
<li>Search <b>Google Drive API</b>. Select and click <b>ENABLE</b></li>
<li>Go to back to main screen of <a target="_blank" href="https://console.developers.google.com/">Google API Console</a></li>
<li>Click <b>OAuth Concent Screen</b> Tab. Enter necessary details and Save.</li>
<li>Click <b>Credentials Tab</b></li>
<li>Click <b>CREATE CREDENTIALS</b> (some where in topbar) and select <b>OAuth Client ID</b> option.</li>
<li>When prompted Select Application Type as <b>Desktop App</b> and click Create to receive your ClientID and Secret. You can use this information now to configure Connection with UseCustomApp=true.</li>
</ol>
]]>
</Notes>
<Params>
<Param Name="UseCustomApp" Value="True" Required="True" Hidden="False" Desc="Use your own app credentials or inbuilt app provided by ZappySys for ease of use. If you choose UseCustomApp=true then make sure to obtain your own ClientId and Secret using steps provided (Click [Steps to Configure] link found next to Authentication Type dropdown)" />
<Param Name="ClientId" VisibleIf="UseCustomApp" RequiredIf="UseCustomApp"/>
<Param Name="ClientSecret" Secret="True" VisibleIf="UseCustomApp" RequiredIf="UseCustomApp" />
<Param Name="Scope" Value="https://www.googleapis.com/auth/drive" />
<Param Name="RetryMode" Value="RetryWhenStatusCodeMatch" Options="None;RetryAny;RetryWhenStatusCodeMatch;" Hidden="True" />
<Param Name="RetryStatusCodeList" Value="403|429" Hidden="True" />
<Param Name="RetryCountMax" Value="5" Hidden="True" />
<Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />
</Params>
</Auth>
<Auth Name="ServiceAccount" Label="Service Account (Using Private Key File)" HelpLink="https://cloud.google.com/docs/authentication/production#create_service_account"
Type="OAuth" ConnStr="Provider=GoogleSheets;UseCustomApp=True;UseClientCertificate=True;CertificateStorageType=PfxFile;CertificatePath=[$PrivateKeyPath$];GrantType=ClientCredentials;RetryMode=RetryWhenStatusCodeMatch;RetryStatusCodeList=403"
TestEndPoint="get_about"
>
<Params>
<Param Name="ClientId" Label="Service Account Email" Desc="This is service account email ID (e.g. some_name@my_project.iam.gserviceaccount.com)" Required="True" />
<Param Name="PrivateKeyPath" Label="Service Account Private Key Path (i.e. *.p12)" Desc="File path for p12 file (i.e. Private Key file for service account). Keep this key file secure" Required="True" />
<Param Name="Scope" Value="https://www.googleapis.com/auth/drive" />
<Param Name="RetryMode" Value="RetryWhenStatusCodeMatch" Options="None;RetryAny;RetryWhenStatusCodeMatch;" Hidden="True" />
<Param Name="RetryStatusCodeList" Value="403|429" Hidden="True" />
<Param Name="RetryCountMax" Value="5" Hidden="True" />
<Param Name="RetryMultiplyWaitTime" Value="True" Hidden="True" />
</Params>
<Notes>
<![CDATA[Use these steps to authenticate as service account rather than Google / GSuite User. Learn more about service account <a href="https://cloud.google.com/iam/docs/service-accounts" target="_blank">here</a><p />
Basically to call Google API as Service account we need to perform following steps listed in 3 sections (Detailed steps found in the help link at the end)<p />
<h3>Create Project</h3>
First thing is create a Project so we can call Google API. Skip this section if you already have Project (Go to next section)
<ol>
<li>Go to <a target="_blank" href="https://console.developers.google.com/">Google API Console</a>
<li>From the Project Dropdown (usually found at the top bar) click Select Project</li>
<li>On Project Propup click <b>CREATE PROJECT</b></li>
<li>Once project is created you can click Select Project to switch the context (You can click on Notification link or Choose from Top Dropdown)</b></li>
<li>Click <b>ENABLE APIS AND SERVICES</b></li>
<li>Now we need to Enable two APIs one by one (Drive API).</li>
<li>Search <b>Drive</b>. Select and click <b>ENABLE</b></li>
</ol>
<h3>Create Service Account</h3>
Once Project is created and APIs are enabled we can now create a service account under that project. Service account has its ID which looks like some email ID (not to confuse with Google /Gmail email ID)
<ol>
<li>Go to <a target="_blank" href="https://console.cloud.google.com/projectselector/iam-admin/serviceaccounts/create?supportedpurview=project/">Create Service Account</a>
<li>From the Project Dropdown (usually found at the top bar) click Select Project</li>
<li>Enter <b>Service account name</b> and <b>Service account description</b></li>
<li>For Role, do not select anything for now and Click <b>Continue</b> and then click <b>Done</b>. Next we will create Key.</li>
</ol>
<h3>Create Key</h3>
Once service account is created we need to create key file (i.e. credentials).
<ol>
<li>In the Cloud Console, click the email address for the service account that you created.</li>
<li>Click <b>Keys</b>.</li>
<li>Click <b>Add key</b>, then click <b>Create new key</b>.</li>
<li>Click <b>Create</b> and select <b>P12</b> format. A <b>P12 key file</b> is downloaded to your computer. We will use this file in our API connection.</li>
<li>Click <b>Close</b>.</li>
<li>Now you may use downloaded *.p12 key file as secret file and Service Account Email as Client ID (e.g. <b>some-service-account-name@your-project-id.iam.gserviceaccount.com</b> ).</li>
</ol>
<h3>Add Permission</h3>
Now last thing is give read/write permission to Service Account. Basically you can create or open Google Sheet and add the Service Account as an editor to it as below.
<ol>
<li>Copy the email address of your service account we created in previous step (its usually like this some-service-account-name@your-project-id.iam.gserviceaccount.com).</li>
<li>Create or select an existing Google Docs File.</li>
<li>Navigate to Google Docs File for which you like to give read/write access to Service Account.</li>
<li>Click on the Share button in the top right, and add the email address of the service account as an editor. Here is how to <a href="https://support.google.com/drive/answer/2494822?hl=en&ref_topic=7000947" target="_blank">share file(s) with specific people</a>. Juse share with Service Account (use Service Account Email found on previous section)</li>
</ol>
]]>
</Notes>
</Auth>
</Auths>
<Template>
<EndPoint Name="ListItemsTemplate">
<Params>
<Param Name="NextUrlAttributeOrExpr"
Value="$.nextPageToken"
Type="Property"/>
<Param Name="NextUrlSuffix"
Value="pageToken=<%nextlink%>"
Type="Property"/>
<Param Name="pageSize" Label="PageSize" Type="Query" Value="1000" Hidden="True" />
<Param Name="Query" Key="q" Label="Search Criteria (Keep blank to get all)" Type="Query" Options="None=;By type (e.g. get folders)=mimeType='application/vnd.google-apps.folder';By name (exact name match)=name='abc';By name (contains sub string)=name contains 'abc';By name (does not contain)=not name contains 'abc';By text (search inside file)=fullText contains 'abc';By date modified=modifiedTime > '2012-06-04T12:00:00'" Desc="File list filter" HelpLink="https://developers.google.com/drive/api/v3/search-files#query_string_examples"/>
</Params>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
<Column Name="createdTime" Label="CreatedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="modifiedTime" Label="ModifiedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="size" Label="Size" DataType="DT_WSTR" Length="200"/>
<Column Name="version" Label="Version" DataType="DT_WSTR" Length="200"/>
<Column Name="shared" Label="Shared" DataType="DT_BOOL"/>
<Column Name="starred" Label="Starred" DataType="DT_BOOL"/>
<Column Name="trashed" Label="Trashed" DataType="DT_BOOL"/>
<Column Name="fileExtension" Label="FileExtension" DataType="DT_WSTR" Length="200"/>
</OutputColumns>
</EndPoint>
<EndPoint Name="DeleteItemTemplate" Label="Delete an item" Desc="Deletes an item"
Url="/drive/v3/files/[$Id$]" Method="DELETE" DotAsPath="True" HelpLink="https://developers.google.com/drive/api/v3/reference/files/delete">
<Params>
<Param Name="Id"
Type="Placeholder"
OptionsEndPoint="list_items"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
Desc="Id of an item you want to delete"
/>
<Param Name="RawOutputDataRowTemplate" Type="Property" Value="{Status:'Deleted'}" />
<Param Name="EnableRawOutputModeSingleRow" Type="Property" Value="True" />
</Params>
<OutputColumns>
<Column Name="Status" DataType="DT_WSTR" />
</OutputColumns>
</EndPoint>
</Template>
<EndPoints>
<!--=====================================
========= GET ABOUT INFO ============
=====================================-->
<EndPoint Name="get_about" Label="Get drive info" Desc="Gets drive information"
Url="/drive/v3/about?fields=*" Method="GET" HelpLink="https://developers.google.com/drive/api/v3/reference/about/get"
>
<OutputColumns>
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="210" />
<Column Name="user.kind" Label="UserKind" DataType="DT_WSTR" Length="200" />
<Column Name="user.displayName" Label="UserDisplayName" DataType="DT_WSTR" Length="180" />
<Column Name="user.me" Label="UserMe" DataType="DT_WSTR" Length="40" />
<Column Name="user.permissionId" Label="UserPermissionId" DataType="DT_I8" />
<Column Name="user.emailAddress" Label="UserEmailAddress" DataType="DT_WSTR" Length="290" />
<Column Name="storageQuota.limit" Label="StorageQuotaLimit" DataType="DT_I8" />
<Column Name="storageQuota.usage" Label="StorageQuotaUsage" DataType="DT_I8" />
<Column Name="storageQuota.usageInDrive" Label="StorageQuotaUsageInDrive" DataType="DT_I8" />
<Column Name="storageQuota.usageInDriveTrash" Label="StorageQuotaUsageInDriveTrash" DataType="DT_I4" />
<Column Name="maxUploadSize" Label="MaxUploadSize" DataType="DT_I8" />
<Column Name="appInstalled" Label="AppInstalled" DataType="DT_WSTR" Length="40" />
<Column Name="folderColorPalette" Label="FolderColorPalette" DataType="DT_WSTR" Length="3390" />
<Column Name="teamDriveThemes" Label="TeamDriveThemes" DataType="DT_NTEXT" />
<Column Name="driveThemes" Label="DriveThemes" DataType="DT_NTEXT" />
<Column Name="canCreateTeamDrives" Label="CanCreateTeamDrives" DataType="DT_WSTR" Length="150" />
<Column Name="canCreateDrives" Label="CanCreateDrives" DataType="DT_WSTR" Length="150" />
</OutputColumns>
</EndPoint>
<!--=====================================
============ LIST ITEMS =============
=====================================-->
<EndPoint Template="ListItemsTemplate" Name="list_items" Label="Search items" Desc="Lists items (i.e. files / folders) with search criteria"
Url="/drive/v3/files?fields=nextPageToken,files(*)" Method="GET" Filter="$.files[*]" HelpLink="https://developers.google.com/drive/api/v3/reference/files/list">
</EndPoint>
<!--=======================================
============ LIST FOLDERS =============
=======================================-->
<EndPoint Name="list_folders" Label="List folders" Desc="Lists folders"
Url="/drive/v3/files?fields=nextPageToken,files(*)" Method="GET" Filter="$.files[*]"
HelpLink="https://developers.google.com/drive/api/v3/reference/files/list"
>
<Params>
<Param Name="NextUrlAttributeOrExpr"
Value="$.nextPageToken"
Type="Property"/>
<Param Name="NextUrlSuffix"
Value="pageToken=<%nextlink%>"
Type="Property"/>
<Param Name="pageSize" Label="PageSize" Type="Query" Value="1000" Hidden="True" />
<Param Name="Query" Key="q" Label="Search Criteria" Type="Query" Value="mimeType='application/vnd.google-apps.folder'" Hidden="False"/>
</Params>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
<Column Name="createdTime" Label="CreatedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="modifiedTime" Label="ModifiedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="size" Label="Size" DataType="DT_WSTR" Length="200"/>
<Column Name="version" Label="Version" DataType="DT_WSTR" Length="200"/>
<Column Name="shared" Label="Shared" DataType="DT_BOOL"/>
<Column Name="starred" Label="Starred" DataType="DT_BOOL"/>
<Column Name="trashed" Label="Trashed" DataType="DT_BOOL"/>
<Column Name="fileExtension" Label="FileExtension" DataType="DT_WSTR" Length="200"/>
</OutputColumns>
</EndPoint>
<!--=======================================
============ LIST FILES ===============
=======================================-->
<EndPoint Name="list_files" Label="List files" Desc="Lists files"
Url="/drive/v3/files?fields=nextPageToken,files(*)" Method="GET" Filter="$.files[*]" HelpLink="https://developers.google.com/drive/api/v3/reference/files/list"
>
<Params>
<Param Name="NextUrlAttributeOrExpr"
Value="$.nextPageToken"
Type="Property"/>
<Param Name="NextUrlSuffix"
Value="pageToken=<%nextlink%>"
Type="Property"/>
<Param Name="pageSize" Label="PageSize" Type="Query" Value="1000" Hidden="True" />
<Param Name="Query" Key="q" Label="Search Criteria" Type="Query"
Options="none=;Allow only shared files and folders=sharedWithMe=true;
Skip trashed files=trashed=false;
Skip Folders=mimeType!='application/vnd.google-apps.folder';
Skip App Script=mimeType!='application/vnd.google-apps.script';
Search for file name=name='enter the filename here';
Search for full text= fullText contains 'enter the fullText here';
Search for spreadsheet= mimeType = 'application/vnd.google-apps.spreadsheet';
Search for multiple files type= mimeType contains 'application/vnd.google-apps.spreadsheet' OR mimeType contains 'application/vnd.google-apps.document' OR mimeType contains 'application/vnd.google-apps.presentation' OR mimeType contains 'application/vnd.google-apps.drawing' "
Desc="Data filter (e.g. somecolumn -eq 'somevalue' ) , User can select multiple filter criteria using 'AND','OR' operator , Note*:- please refer the link for more filter criteria : https://zappysys.com/links?url=https://developers.google.com/drive/api/guides/search-files " HelpLink="https://zappysys.com/links?url=https://developers.google.com/drive/api/guides/search-files" Hidden="False" />
</Params>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
<Column Name="createdTime" Label="CreatedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="modifiedTime" Label="ModifiedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="size" Label="Size" DataType="DT_WSTR" Length="200"/>
<Column Name="version" Label="Version" DataType="DT_WSTR" Length="200"/>
<Column Name="shared" Label="Shared" DataType="DT_BOOL"/>
<Column Name="starred" Label="Starred" DataType="DT_BOOL"/>
<Column Name="trashed" Label="Trashed" DataType="DT_BOOL"/>
<Column Name="fileExtension" Label="FileExtension" DataType="DT_WSTR" Length="200"/>
</OutputColumns>
</EndPoint>
<!--=======================================
======== LIST DELETED FILES ===========
=======================================-->
<EndPoint Name="list_deleted_files" Label="List deleted files" Desc="Lists files"
Url="/drive/v3/files?fields=nextPageToken,files(*)" Method="GET" Filter="$.files[*]" HelpLink="https://developers.google.com/drive/api/v3/reference/files/delete"
>
<Params>
<Param Name="NextUrlAttributeOrExpr"
Value="$.nextPageToken"
Type="Property"
/>
<Param Name="NextUrlSuffix"
Value="pageToken=<%nextlink%>"
Type="Property"
/>
<Param Name="pageSize" Label="PageSize" Type="Query" Value="1000" Hidden="True" />
<Param Name="Query" Key="q" Label="Search Criteria" Type="Query" Value="trashed=true" Hidden="False"/>
</Params>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
<Column Name="createdTime" Label="CreatedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="modifiedTime" Label="ModifiedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="size" Label="Size" DataType="DT_WSTR" Length="200"/>
<Column Name="version" Label="Version" DataType="DT_WSTR" Length="200"/>
<Column Name="shared" Label="Shared" DataType="DT_BOOL"/>
<Column Name="starred" Label="Starred" DataType="DT_BOOL"/>
<Column Name="trashed" Label="Trashed" DataType="DT_BOOL"/>
<Column Name="fileExtension" Label="FileExtension" DataType="DT_WSTR" Length="200"/>
</OutputColumns>
</EndPoint>
<!--=====================================
========== GET FILE INFO ============
=====================================-->
<EndPoint Name="get_file_info" Label="Get file info" Desc="Gets information of a file"
Url="/drive/v3/files/[$Id$]?fields=*" Method="GET" DotAsPath="True" HelpLink="https://developers.google.com/drive/api/v3/reference/files/get"
>
<Params>
<Param Name="Id"
Type="Placeholder"
OptionsEndPoint="list_items"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
Desc="Id of a file you want to see information for"
Required="True"
/>
</Params>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
<Column Name="createdTime" Label="CreatedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="modifiedTime" Label="ModifiedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="size" Label="Size" DataType="DT_WSTR" Length="200"/>
<Column Name="version" Label="Version" DataType="DT_WSTR" Length="200"/>
<Column Name="shared" Label="Shared" DataType="DT_BOOL"/>
<Column Name="starred" Label="Starred" DataType="DT_BOOL"/>
<Column Name="trashed" Label="Trashed" DataType="DT_BOOL"/>
<Column Name="fileExtension" Label="FileExtension" DataType="DT_WSTR" Length="200"/>
</OutputColumns>
</EndPoint>
<!--=====================================
========= DOWNLOAD A FILE ===========
=====================================-->
<EndPoint Name="download_file" Label="Download a file" Desc="Downloads a file"
Url="/drive/v3/files/[$Id$]?alt=media" Method="GET"
OutputHeaders="Content-Length" HelpLink="https://developers.google.com/drive/api/v3/reference/files/get"
>
<Params>
<Param Name="Id"
Label="File Id"
Required="True"
Type="Placeholder"
OptionsEndPoint="list_items"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
Desc="Id of a file you want to download"
/>
<Param Name="RequestTimeoutMs"
Type="Property"
Desc="Timeout in milliseconds after which download stops"
Value="7200000"
/>
<Param Name="SaveContentAsBinary"
Type="Property"
Hidden="True"
Value="True"
/>
<Param Name="FileOverwriteMode" Type="Property" Value="AlwaysOverwrite" Required="True"/>
<Param Name="ResponseDataFile" Required="True" Type="Property" Value="c:\ParentFolder\Subfolder\myfile.ext" Editor="FileSave" />
<Param Name="RawOutputDataRowTemplate" Type="Property" Value="{Status:'Downloaded'}" />
<Param Name="EnableRawOutputModeSingleRow" Type="Property" Value="True" />
</Params>
<OutputColumns>
<Column Name="Status" DataType="DT_WSTR" />
</OutputColumns>
</EndPoint>
<!--=====================================
========= EXPORT A FILE ===========
=====================================-->
<EndPoint Name="export_file" Label="Export a file" Desc="Export a document editor files such document, Spreadsheets, Drawings, Presentations, Apps Scripts to common file formats as defined in this link https://developers.google.com/drive/api/guides/ref-export-formats"
Url="/drive/v3/files/[$Id$]/export?mimeType=[$ExportAs$]" Method="GET"
OutputHeaders="Content-Length" HelpLink="https://developers.google.com/drive/api/v3/reference/files/export"
>
<Params>
<Param Name="Id"
Label="File Id"
Required="True"
Type="Placeholder"
OptionsEndPoint="list_items"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
OptionsEndPointParameters="Query= mimeType contains 'application/vnd.google-apps.spreadsheet' OR mimeType contains 'application/vnd.google-apps.document' OR mimeType contains 'application/vnd.google-apps.presentation' OR mimeType contains 'application/vnd.google-apps.drawing'"
Desc="Id of a file you want to export and file must be editor type (e.g. document, Spreadsheets, Drawings, Presentations, Apps Scripts)"
/>
<Param Name="ExportAs"
Label="Export As (Mime Type)"
Required="True"
Type="Placeholder"
Desc="The MIME type of the format requested for this export."
Options="None=;Export to PDF=application/pdf;
Export to HTML=text/html;
Export to HTML (zipped)=application/zip;
Export to Plain text=text/plain;
Export to Rich text=application/rtf;
Export to Open Office doc=application/vnd.oasis.opendocument.text;
Export to MS Word document=application/vnd.openxmlformats-officedocument.wordprocessingml.document;
Export to EPUB=application/epub+zip;
Export to MS Excel=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;
Export to Open Office sheet=application/x-vnd.oasis.opendocument.spreadsheet;
Export to (sheet only)=text/tab-separated-values;
Export to JPEG=image/jpeg;
Export to PNG=image/png;
Export to SVG=image/svg+xml;
Export to MS PowerPoint=application/vnd.openxmlformats-officedocument.presentationml.presentation;
Export to Open Office presentation=application/vnd.oasis.opendocument.presentation;
Export to JSON=application/vnd.google-apps.script+json;"
HelpLink="https://developers.google.com/drive/api/guides/mime-types"
/>
<Param Name="fields"
Type="Placeholder"
Desc="fields"
Value="True"
Hidden="True"
/>
<Param Name="RequestTimeoutMs"
Type="Property"
Desc="Timeout in milliseconds after which download stops"
Value="7200000"
/>
<Param Name="SaveContentAsBinary"
Type="Property"
Hidden="True"
Value="True"
/>
<Param Name="FileOverwriteMode" Type="Property" Value="AlwaysOverwrite" Required="True"/>
<Param Name="ResponseDataFile" Required="True" Type="Property" Value="c:\ParentFolder\Subfolder\myfile.ext" Editor="FileSave" />
<Param Name="RawOutputDataRowTemplate" Type="Property" Value="{Status:'Downloaded'}" />
<Param Name="EnableRawOutputModeSingleRow" Type="Property" Value="True" />
</Params>
<OutputColumns>
<Column Name="Status" DataType="DT_WSTR" />
</OutputColumns>
</EndPoint>
<!--=====================================
========== UPLOAD A FILE ============
=====================================-->
<EndPoint Name="upload_file" Label="Upload a file" Desc="Uploads a file"
Url="/upload/drive/v3/files?uploadType=resumable" Method="POST"
OutputHeaders="Location"
ContentType="application/json"
HelpLink="https://developers.google.com/drive/api/v3/reference/files/create"
>
<Params>
<Param Name="FileName"
Required="True"
Type="Placeholder"
Desc="A filename the file will have in Google Drive"
Example="myfile.ext"
Value="myfile.ext"
/>
<Param Name="DiskFilePath"
Required="True"
Type="Placeholder"
Desc="Specify a disk file path"
Example="C:\MyParentFolder\Subfolder\file.txt"
Editor="FileOpen"
Value=""
/>
<Param Name="ParentFolderId"
Type="Placeholder"
OptionsEndPoint="list_folders"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
Desc="Id of a parent folder you want to upload the file in. Use value 'root' to place the file in the topmost level."
Value="root"
/>
<Param Name="RawOutputDataRowTemplate" Type="Property" Value="{Status:'Uploaded'}" Target="upload_file" />
<Param Name="EnableRawOutputModeSingleRow" Type="Property" Value="True" Target="upload_file" />
<Param Name="keepRevisionForever"
Label="KeepRevisionForever"
Required="False"
Type="Query"
Hidden="False"
Desc="Defines whether uploaded file has revisions"
Value=""
/>
<Param Name="addParents"
Label="AddParents"
Required="False"
Type="Query"
Hidden="True"
Desc="A comma-separated list of parent IDs to add"
Value=""
/>
<Param Name="ocrLanguage"
Label="OcrLanguage"
Required="False"
Type="Query"
Hidden="True"
Desc="A language hint for OCR processing during image import (ISO 639-1 code)."
Value=""
/>
<Param Name="useContentAsIndexableText"
Label="UseContentAsIndexableText"
Required="False"
Type="Query"
Hidden="True"
Desc=" Whether to use the uploaded content as indexable text."
Value="False"
/>
</Params>
<Body>
<![CDATA[ { "kind": "drive#file"
,"name": "[$FileName$]"
,"parents": [ "[$ParentFolderId$]" ] }
]]>
</Body>
<EndPoint Name="child_upload_file"
Url="[$parent.ResponseHeaders_Location$]" Method="PUT" Body="[$DiskFilePath$]">
<Params>
<Param Name="EnableSplitStreamForUpload" Type="Property" Value="True" Target="child_upload_file" Required="True" Hidden="True" Desc="Must be set to 'True'" />
<Param Name="BytesPerSplit" Type="Property" Value="33554432" Hidden="True" />
<Param Name="ContineOnErrorForStatusCode" Type="Property" Value="True" Hidden="True" />
<Param Name="ConsumeResponseOnError" Type="Property" Value="True" Hidden="True" />
<Param Name="ErrorStatusCodeToMatch" Type="Property" Value="308" Hidden="True" />
<Param Name="RequestTimeoutMs"
Type="Property"
Desc="Timeout in milliseconds after which upload stops"
Value="7200000"
/>
</Params>
</EndPoint>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
<!-- id must be duplicated and set this way -->
<Column Name="id" Label="FileSize" DataType="DT_I8" ValueTemplate="[$DiskFilePath,FUN_FILE_SIZE$]" />
</OutputColumns>
</EndPoint>
<!--=====================================
========== CREATE FOLDER ============
=====================================-->
<EndPoint Name="create_folder" Label="Create a folder" Desc="Creates a folder"
Url="/drive/v3/files?alt=json" Method="POST"
ContentType="application/json"
HelpLink="https://developers.google.com/drive/api/guides/folder"
>
<Params>
<Param Name="Name"
Required="True"
Type="Placeholder"
Desc="A folder name the folder will have in Google Drive"
Example="MyFolder"
Value="MyFolder"
/>
<Param Name="ParentFolderId"
Type="Placeholder"
OptionsEndPoint="list_folders"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
Value="root"
Desc="Id of a parent folder you want to create the folder in. Use value 'root' to create the folder in the topmost level."
/>
</Params>
<Body>
<![CDATA[ { "kind": "drive#file"
,"name": "[$Name$]"
,"parents": [ "[$ParentFolderId$]" ] }
]]>
</Body>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
</OutputColumns>
</EndPoint>
<!--=====================================
========= DELETE AN ITEM ============
=====================================-->
<EndPoint Template="DeleteItemTemplate" Name="delete_item" Label="Delete an item" Desc="Deletes an item"
Url="/drive/v3/files/[$Id$]" Method="DELETE" DotAsPath="True" HelpLink="https://developers.google.com/drive/api/v3/reference/files/delete"
>
</EndPoint>
<!--=====================================
=========== COPY AN ITEM ============
=====================================-->
<EndPoint Name="copy_file" Label="Duplicate a file" Desc="Duplicates a file"
Url="/drive/v3/files/[$Id$]/copy?fields=*" Method="POST" DotAsPath="True" HelpLink="https://developers.google.com/drive/api/v3/reference/files/copy"
>
<Params>
<Param Name="Id"
Type="Placeholder"
OptionsEndPoint="list_items"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
Desc="Id of a file you want to duplicate"
/>
</Params>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
<Column Name="createdTime" Label="CreatedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="modifiedTime" Label="ModifiedTime" DataType="DT_DBTIMESTAMP"/>
<Column Name="size" Label="Size" DataType="DT_WSTR" Length="100"/>
<Column Name="version" Label="Version" DataType="DT_WSTR" Length="200"/>
<Column Name="shared" Label="Shared" DataType="DT_BOOL"/>
<Column Name="starred" Label="Starred" DataType="DT_BOOL"/>
<Column Name="trashed" Label="Trashed" DataType="DT_BOOL"/>
<Column Name="fileExtension" Label="FileExtension" DataType="DT_WSTR" Length="200"/>
</OutputColumns>
</EndPoint>
<!--=====================================
========= UPDATE A FILE =============
=====================================-->
<EndPoint Name="update_file" Label="Update a file" Desc="Update file"
Url="/upload/drive/v3/files/[$Id$]?uploadType=resumable" Method="PATCH" DotAsPath="True"
OutputHeaders="Location"
ContentType="application/json"
HelpLink="https://developers.google.com/drive/api/v3/reference/files/update"
>
<Params>
<Param Name="Id"
Type="Placeholder"
Required="True"
OptionsEndPoint="list_files"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
Desc="Id of a file you want to update"
/>
<Param Name="DiskFilePath"
Required="True"
Type="Placeholder"
Desc="A disk file path you want to update file contents with"
Example="C:\MyParentFolder\Subfolder\file.txt"
Editor="FileOpen"
Value=""
/>
<Param Name="RawOutputDataRowTemplate" Type="Property" Value="{Status:'Updated'}" Target="update_file" />
<Param Name="EnableRawOutputModeSingleRow" Type="Property" Value="True" Target="update_file" />
<Param Name="keepRevisionForever"
Label="KeepRevisionForever"
Required="False"
Type="Query"
Hidden="False"
Desc="Defines whether uploaded file has revisions"
Value=""
/>
<Param Name="addParents"
Label="AddParents"
Required="False"
Type="Query"
Hidden="True"
Desc="A comma-separated list of parent IDs to add"
Value=""
/>
<Param Name="ocrLanguage"
Label="OcrLanguage"
Required="False"
Type="Query"
Hidden="True"
Desc="A language hint for OCR processing during image import (ISO 639-1 code)."
Value=""
/>
<Param Name="useContentAsIndexableText"
Label="UseContentAsIndexableText"
Required="False"
Type="Query"
Hidden="True"
Desc=" Whether to use the uploaded content as indexable text."
Value="False"
/>
</Params>
<Body>
<![CDATA[ { "kind": "drive#file" } ]]>
</Body>
<EndPoint Name="child_upload_file"
Url="[$parent.ResponseHeaders_Location$]" Method="PUT" Body="[$DiskFilePath$]">
<Params>
<Param Name="EnableSplitStreamForUpload" Type="Property" Value="True" Target="child_upload_file" Required="True" Hidden="True" Desc="Must be set to 'True'" />
<Param Name="BytesPerSplit" Type="Property" Value="33554432" Hidden="True" />
<Param Name="ContineOnErrorForStatusCode" Type="Property" Value="True" Hidden="True" />
<Param Name="ConsumeResponseOnError" Type="Property" Value="True" Hidden="True" />
<Param Name="ErrorStatusCodeToMatch" Type="Property" Value="308" Hidden="True" />
<Param Name="RequestTimeoutMs"
Type="Property"
Desc="Timeout in milliseconds after which upload stops"
Value="7200000"
/>
</Params>
</EndPoint>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
<!-- id must be duplicated and set this way -->
<Column Name="id" Label="FileSize" DataType="DT_I8" ValueTemplate="[$DiskFilePath,FUN_FILE_SIZE$]" />
</OutputColumns>
</EndPoint>
<!--==============================================
========= UPDATE METADATA IN A FILE ==========
============================================== -->
<EndPoint Name="update_metadata_file" Label="Update metadata in a file" Desc="Updates meta-data in a file"
Url="/drive/v3/files/[$Id$]" Method="PATCH" DotAsPath="True"
ContentType="application/json" JsonRowFormat="Multicontent" HelpLink="https://developers.google.com/drive/api/v3/reference/files/update"
>
<Params>
<Param Name="Id"
Type="Placeholder"
Required="True"
OptionsEndPoint="list_files"
OptionsEndPointValueColumn="Id"
OptionsEndPointLabelColumn="Name"
Desc="Id of a file you want to update meta-data to"
/>
<Param Name="keepRevisionForever"
Label="KeepRevisionForever"
Required="False"
Type="Query"
Hidden="False"
Desc="Defines whether uploaded file has revisions"
Value=""
MultiSelect="False"
Options="True;False"
/>
<Param Name="addParents"
Label="AddParents"
Required="False"
Type="Query"
Hidden="True"
Desc="A comma-separated list of parent IDs to add"
Value=""
/>
<Param Name="ocrLanguage"
Label="OcrLanguage"
Required="False"
Type="Query"
Hidden="True"
Desc="A language hint for OCR processing during image import (ISO 639-1 code)."
Value=""
/>
<Param Name="useContentAsIndexableText"
Label="UseContentAsIndexableText"
Required="False"
Type="Query"
Hidden="True"
Desc=" Whether to use the uploaded content as indexable text."
Value="False"
/>
</Params>
<Body>
<![CDATA[ {$rows$} ]]>
</Body>
<InputColumns>
<Column Name="appProperties" Label="AppProperties" Desc="A collection of arbitrary key-value pairs which are private to the requesting app.
Entries with null values are cleared in update and copy requests. These properties can only be retrieved using an authenticated request. An authenticated request uses an access token obtained with a OAuth 2 client ID. You cannot use an API key to retrieve private properties."
DataType="DT_WSTR" Length="2000" Raw="True"/>
<Column Name="contentHints.indexableText" Label="ContentHintsIndexableText" Desc="Text to be indexed for the file to improve fullText queries. This is limited to 128KB in length and may contain HTML elements."
DataType="DT_WSTR" Length="2000"/>
<Column Name="contentHints.thumbnail.image" Label="ThumbnailImage" Desc="The thumbnail data encoded with URL-safe Base64 (RFC 4648 section 5)."
DataType="DT_WSTR" Length="4000"/>
<Column Name="contentHints.thumbnail.mimeType" Label="ThumbnailMimeType" Desc="The MIME type of the thumbnail"
DataType="DT_WSTR" Length="4000"/>
<Column Name="contentRestrictions" Label="ContentRestrictionsReadOnly" Desc="Format: 'contentRestrictions[].readOnly'. Whether the content of the file is read-only. If a file is read-only, a new revision of the file may not be added, comments may not be added or modified, and the title of the file may not be modified."
DataType="DT_WSTR" Length="4000" Raw="True"/>
<Column Name="contentRestrictions" Label="ContentRestrictionsReason" Desc="Format: 'contentRestrictions[].reason'. Reason for why the content of the file is restricted. This is only mutable on requests that also set readOnly=true."
DataType="DT_WSTR" Length="4000" Raw="True"/>
<Column Name="copyRequiresWriterPermission" Label="CopyRequiresWriterPermission" Desc="Whether the options to copy, print, or download this file, should be disabled for readers and commenters"
DataType="DT_BOOL"/>
<Column Name="description" Label="Description" Desc="A short description of the file."
DataType="DT_WSTR"/>
<Column Name="folderColorRgb" Label="FolderColorRgb" Desc="The color for a folder or shortcut to a folder as an RGB hex string. The supported colors are published in the folderColorPalette field of the About resource.
If an unsupported color is specified, the closest color in the palette will be used instead."
DataType="DT_WSTR" Length="2000"/>
<Column Name="mimeType" Label="MimeType" Desc="The MIME type of the file.
Google Drive will attempt to automatically detect an appropriate value from uploaded content if no value is provided. The value cannot be changed unless a new revision is uploaded.
If a file is created with a Google Doc MIME type, the uploaded content will be imported if possible. The supported import formats are published in the About resource."
DataType="DT_WSTR" Length="2000"/>
<Column Name="modifiedTime" Label="ModifiedTime" Desc="Format: 2019-10-12T07:20:50.52Z. The last time the file was modified by anyone (RFC 3339 date-time).
Note that setting modifiedTime will also update modifiedByMeTime for the user"
DataType="DT_DBTIMESTAMP"/>
<Column Name="name" Label="Name" Desc="The name of the file. This is not necessarily unique within a folder. Note that for immutable items such as the top level folders of shared drives, My Drive root folder, and Application Data folder the name is constant."
DataType="DT_WSTR" Length="2000"/>
<Column Name="originalFilename" Label="OriginalFilename" Desc="The original filename of the uploaded content if available, or else the original value of the name field. This is only available for files with binary content in Google Drive."
DataType="DT_WSTR" Length="2000"/>
<Column Name="properties" Label="Properties" Desc="Entry as JSON object. A collection of arbitrary key-value pairs which are visible to all apps.
Entries with null values are cleared in update and copy requests."
DataType="DT_WSTR" Length="2000" Raw="True"/>
<Column Name="starred" Label="Starred" Desc="Whether the user has starred the file."
DataType="DT_BOOL"/>
<Column Name="trashed" Label="Trashed" Desc="Whether the file has been trashed, either explicitly or from a trashed parent folder. Only the owner may trash a file. The trashed item is excluded from all files.list responses returned for any user who does not own the file. However, all users with access to the file can see the trashed item metadata in an API response. All users with access can copy, download, export, and share the file."
DataType="DT_BOOL"/>
<Column Name="viewedByMeTime" Label="ViewedByMeTime" Desc="Format: 2019-10-12T07:20:50.52Z. The last time the file was viewed by the
user (RFC 3339 date-time)."
DataType="DT_DBTIMESTAMP" Length="2000"/>
<Column Name="writersCanShare" Label="WritersCanShare" Desc="Whether users with only writer permission can modify the file's permissions. Not populated for items in shared drives."
DataType="DT_BOOL"/>
</InputColumns>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
</OutputColumns>
</EndPoint>
<!--=====================================
=========== EMPTY TRASH =============
=====================================-->
<EndPoint Name="empty_trash" Label="Empty trash" Desc="Empties trash"
Url="/drive/v3/files/trash" Method="DELETE" DotAsPath="True" HelpLink="https://developers.google.com/drive/api/v3/reference/files/emptyTrash"
>
<OutputColumns>
<Column Name="id" Label="Id" DataType="DT_WSTR" Length="440" />
<Column Name="kind" Label="Kind" DataType="DT_WSTR" Length="200" />
<Column Name="name" Label="Name" DataType="DT_WSTR" Length="780" />
<Column Name="mimeType" Label="MimeType" DataType="DT_WSTR" Length="650" />
</OutputColumns>
</EndPoint>
<!--=======================================
========== DELETE ALL FILES ===========
=======================================-->
<EndPoint Template="ListItemsTemplate" Name="delete_all_items" Label="Delete all items" Desc="Deletes all items from the drive"
Url="/drive/v3/files" Method="GET" Filter="$.files[*]" HelpLink="https://developers.google.com/drive/api/v3/reference/files/delete"
>
<EndPoint Template="DeleteItemTemplate"
Url="/drive/v3/files/[$parent.id$]" Method="DELETE"
>
</EndPoint>
</EndPoint>
</EndPoints>
<!--=====================================
============= TABLES ================
=====================================-->
<Tables>
<Table Name="Drive"
SelectEndPoint="get_about"
/>
<Table Name="Files"
SelectEndPoint="list_files"
UpdateEndPoint="update_file"
DeleteEndPoint="delete_item"
InsertEndPoint="upload_file"
/>
<Table Name="Folders"
SelectEndPoint="list_folders"
DeleteEndPoint="delete_item"
InsertEndPoint="create_folder"
/>
<Table Name="FileInfo"
SelectEndPoint="get_file_info"
/>
<Table Name="ItemsList"
SelectEndPoint="list_items"
/>
<Table Name="FilesList"
SelectEndPoint="list_files" LookupEndPoint="get_file_info"
/>
<Table Name="FoldersList"
SelectEndPoint="list_folders"
/>
<Table Name="Trash"
SelectEndPoint="list_deleted_files"
DeleteEndPoint="empty_trash"
/>
</Tables>
<!--=====================================
============ EXAMPLES ===============
=====================================-->
<Examples>
<Example Group="ODBC" Label="Get drive information" Desc="Gets drive information">
<Code>
<![CDATA[SELECT *
FROM Drive]]>
</Code>
</Example>
<!-- Files and endpoints table -->
<Example Group="ODBC" Label="Dowload a file" Desc="Downloads a file">
<Code>
<![CDATA[SELECT * FROM download_file
WITH(Id='1PpE2eSi5faAnMwiSolwr34zA5MwOdR3D'
,ResponseDataFile='C:\MyFiles\myfile.ext'
)
--You can get file Id by selecting from 'list_files' endpoint]]>
</Code>
</Example>
<Example Group="ODBC" Label="Get file list" Desc="Downloads a file">
<Code>
<![CDATA[SELECT * FROM Files]]>
</Code>
</Example>
<Example Group="ODBC" Label="Update a file" Desc="Updates a file">
<Code>
<![CDATA[UPDATE Files
WITH (Id='1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM'
,DiskFilePath='C:\MyFiles\myfile.ext')
--You can get file Id by selecting from 'list_files' endpoint]]>
</Code>
</Example>
<Example Group="ODBC" Label="Delete a file" Desc="Deletes a file">
<Code>
<![CDATA[DELETE FROM Files
WITH (Id='1gcu0hV34OTfgvcu9CFhr7Go4b35j5Mop')
--You can get file Id by selecting from 'list_files' endpoint]]>
</Code>
</Example>
<Example Group="ODBC" Label="Upload a file" Desc="Uploads a file">
<Code>
<![CDATA[INSERT INTO Files
WITH (FileName='My filename'
,DiskFilePath='C:\MyFolder\Mymyfile.ext'
,ParentFolderId='root')
--You can get ParentFolderId by selecting from 'list_folders' endpoint or just use 'root']]>
</Code>
</Example>
<!-- Folders table -->
<Example Group="ODBC" Label="Delete a folder" Desc="Deletes a folder">
<Code>
<![CDATA[DELETE FROM Folders
WITH (Id='1yDO11prsLH9DUrBTCadV6GGMJrITjF9I')
--You can get folder Id by selecting from 'list_folders' endpoint]]>
</Code>
</Example>
<Example Group="ODBC" Label="Create a folder" Desc="Creates a folder">
<Code>
<![CDATA[INSERT INTO Folders
WITH (Name='My folder name'
,ParentFolderId='root')
--You can get ParentFolderId by selecting from 'list_folders' endpoint or just use 'root']]>
</Code>
</Example>
<!-- FileInfo table -->
<Example Group="ODBC" Label="Get file information" Desc="Gets file information">
<Code>
<![CDATA[SELECT * FROM FileInfo
WITH (Id='1EVzXFVBQIh3LcJvfcLhI1UWhW3qUxFkM')
--You can get file Id by selecting from 'list_files' endpoint]]>
</Code>
</Example>
<!-- ItemsList table -->
<Example Group="ODBC" Label="Get items list" Desc="Gets items list">
<Code>
<![CDATA[SELECT * FROM ItemsList]]>
</Code>
</Example>
<Example Group="ODBC" Label="Get items list using query" Desc="Gets items list using query">
<Code>
<![CDATA[SELECT Id, Kind, Name, MimeType
FROM list_items
WITH (Query = 'name contains ''.txt''')]]>
</Code>
</Example>
<!-- FilesList table -->
<Example Group="ODBC" Label="Get files list" Desc="Gets files list">
<Code>
<![CDATA[SELECT * FROM FilesList]]>
</Code>
</Example>
<!-- FoldersList table -->
<Example Group="ODBC" Label="Get folders list" Desc="Gets folders list">
<Code>
<![CDATA[SELECT * FROM FoldersList]]>
</Code>
</Example>
<!-- Trash table -->
<Example Group="ODBC" Label="Select from trash" Desc="Shows deleted items in Trash">
<Code>
<![CDATA[SELECT * FROM Trash]]>
</Code>
</Example>
<Example Group="ODBC" Label="Empty trash bin" Desc="Empties trash bin">
<Code>
<![CDATA[DELETE FROM Trash]]>
</Code>
</Example>
<!-- export_file-->
<Example Group="ODBC" Label="Export File" Desc="Export a Google files to know other format ">
<Code>
<![CDATA[SELECT "Status" FROM export_file
WITH(
Id='1j0HFOP4gsoE-Zbf2xN3IsPSj8wgwNtIfyyvM1_BWkW4'
, ExportAs='application/pdf'
))
--You can export files from 'export_file' endpoint]]>
</Code>
</Example>
</Examples>
</ApiConfig>