Google Drive Connector
Documentation
Version: 7
Documentation

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,iVBORw0KGgoAAAANSUhEUgAAAIAAAAByCAYAAACbZNnZAAAAAXNSR0IArs4c6QAAB59JREFUeF7tnU1sVUUYht+5LRiDFgmBJoKNEm1MDBE1Iia6MNJ7dacESFxqiGGhMdGluMKtutDEne6hgsu2CP6RGFMVI/gHJEYImLDwBzAGuO2YQ3vb28s598z/fN85c5ftnJk58z7vO9+ce3srwPm1d6MkMf03jgsS8zCYBL+JUxG9aLGZwcALgPGWxM/nDTgPd4l85DhEE2zWlcdEx1vvAnhpQUaiEGTid73eE028HA49s5HoA3Cg9Txm8cGS2+MBACDwghjDh2bShLmKPgBZ7Oe9iEHQ4/6FGVPfDmgDUCR+Z3mJQFAkfmealCGgC8B4awJAq28QMgEAwKRo4qkwoa43CmUA1M74kSEocz/1FKAJQFn0d0POBIBsyhS3Av4AZCsbCQJV91NOAXoA6Li/s7KnL1zEtfaQ3u5n13rryssXD937m/aY1FKgGgBESAFd91NNAVoAmLg/Qj1gKj5FCOgAYCt+wBSwBYBSQVgtAAJA4EL8BEBv/eXC/YGeDroCgAoENBLAJQAeU8Cl+AmAjmNdi5/1225fwqkLt9od9JZefXXziUvLhHTaJwUI4ibAx8070BZnXAq10Jfjh0Ou3b8wT4kR0cJZL2ug0GlcAHy438Ox0Jv483ON+XAoHgC+xXdYC/gGIOZWUG0AHEAQQvz6ARDC/Z2t4Jc/ZiDlgMJ2eEOT5Q3MXHn4uNG1JuPF2AriJEBIACxSIJT7Yz4iDg9AaPENHxCFFj8WBGEB2N88BiE2mcSj9TWax8JYAAD4XjTxgPX9KnYQFoBY7tdMgYjiX59pyFogHACxxdeoBWIDEBKCegGgAAEF8asHAAX3d7aB83+dwT//jeRtke/fde7M7rV/5v5OcUt12izEVhAmASgB0CcFqLg/5InAPwDUxC8oCKmJHwoCvwBQFT8nBagC4LseqC8AXRBQFp8vAJTd37MNUAfAJwT+EoADAADk0KTTyt1XZ75OBH4AYCI+ZocGJfYDt6HtSziX/fqAwD0AH7UehMS3Lm/cW1/bJ6/fv5yC2l8ie5uIYscDeEg8ie8UWys1cw8AF/fPi99ZJS4QuE4BtwBwET9TnSkArgvCegLQI36dU8AdAHzcfxXbJ2/K2yDlFK4AWK60eUZu5GorqB8ABe6vawq4AYCL+0vEryME9gCMt34HQOYt1L7JXDEAIDAhxvC0zW7kAgAeZ2hF8euWAnYAcIn+nGNfmWu4PBewPRbWAwBN99cpBcwBYON+8Ta2T7xW5viCY+FbAF41uTb0NabHwuoDYOj+uqSAGQBc3G8pfh0g0AeAi/gGhV9RbDMqCNuiiWU62091AXDk/qqngB4ANXQ/NwB0j4XVBMCx+7lBoHMiUAeAi/tnhwaxc/+Mzj6o2lbuw0DVPj6mBsC+sU1oNI6pLlTUdp7czy0F8DcGxU6UGkENAC7u9yw+NwhUtoJyALiI7/DYV5ZgjI6Fpd81UB0AArm/ainQH4Dk/sIwqEoKVAOAwO6vUgoUA8DF/ZHErwoE+QCMt04AuK+sGCLx+wSAmgwSG0ULma5LXkUAVPJjXmorpd+KSz2Qdyy8EQAu0R/w2FeGBBcA8t4n4AtA5OjvhYILBL0psBQALu6X8iB2TG0rc2bI38spHADwbMgxTcfqhoAnAMTcz/lEsAgAF/cTFZ8rBHMAcBGfUOFXFL9cagE0sFlsxTQvAIi7n2MKJABMK6k+13FJgawYFGzin4n72aUACwCuza7Dc4fOezCrty7lFG4HcM7bAI465pEAzNzPKQUEdv9E+rn/6PpRR6zH6eboF1viDKw4qsCLJ2kDMLJB8VZoNjv66aM0JzY/K9IAjDIXv6M8ZQgSAAH8SRuAbAEIbgNVcT/lFFh7eFrMPQgiBkDVxKcKQRcAvx4ExDMB0lBpiASA0jJZNZISB4ePTG9bfDeQSApUVXxqKZC5P5vT0s8DEIAgAWBlbKWLO+KTA6Dq4lNJgWIAIhaEq1euOrV65ap7lBBm3uiV0+9gx9l9Ue6iW/wbEyAiAHVxf+wUKAcgAgR1Ez8WBL3i5ydA9tNdp7agIb8KlVEJgAArLRqPr/3k66O9IxX/bWCgE0FdxQ+dAnnuL06AzuwCQJAA8P9uYZH40QGou/ihUsAcAI8F4ejIhuyfNQ4G2P3IDzEgZ/D5Z495mWc/8csTwC8AXm6Ya6e+3jK2B8ADBCn68zF1DUGZ+GoJMDfX7IMjs67clQDwD8Caw9MNgfJ/iVv+LWGOTwRJ/P42cpUCKu7XSYC5WVseCxuNxpW719+Z+08bXaUL934mvhzDLe3LVrehKn5wAJL71XS1TQF/AFikQBJfTXzbZwM64usnwHUAzD4+lgDwD4CE/GH48Df364ykXgR296pZCyTxdSRZbKu7Fei63ywBDE4FCQD/AJiIHwSAJL6Z+Lq1QHgAFArCdWuG/11x84oVdktQ76ufuHAEe398ve8imIpvlwAKACT3u4G3rBaIB0AfCJL4bsQv2wpsxLdPgD4FYQLAPwC24rsDoCcJkvhuxc9LARfiuwWgC4IEgF8AXInvHoD5+x59s036W0f8yOO/15N7Bs0e3PWZmvMOu8dKIDiBQp7cM9hw0lNOJ/8D2+XdP1Q0hRoAAAAASUVORK5CYII="
           Version="7"
           EngineVersion="4"
           >
	<VersionHistory>
		<Change Type="Fix" Date="2023-09-21">EndPoint list_files should not include folders.</Change>
		<Change Type="Fix" Date="2023-09-21">EndPoints like list_files, list_folders, list_items and tables like Files, Folders should not include deleted items.</Change>
	    <Change Type="New" Date="2023-09-21">Add ContineOn404Error support in Files / Folders endpoints which takes File Id as input.</Change>
		<Change Type="New" Date="2023-09-21">Add lookup support in Files / Folders table.</Change>
		<Change Type="Fix" Date="2023-09-21">create_folder endpoint creating file rather than folder.</Change>
		<Change Type="New" Date="2023-09-21">Add support for Shared Drive for all operations (i.e Download / Upload / Delete / List).</Change>
		<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.
    <div style="background-color: #f5f2c4; border-style: solid; border-color: #000000; border-width: 1px; margin-top: 3px; margin-bottom: 6px; padding: 6px;">
		<b>NOTE:</b> If you are planning to use your current data connection/token for automated processes, we recommend that you use a generic account for token generation when the login box appears (e.g. sales_automation@mycompany.com instead of bob_smith@mycompany.com). When you use a personal account which is tied to a specific employee profile and that employee leaves the company, the token may become invalid and any automated processes using that token will fail. Another potentially unwanted effect of using a personal token is incorrect logging; the API calls (e.g. Read, Edit, Delete, Upload) made with that token will record the specific user as performing the calls instead of an automated process.
    </div>
  </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="DriveSupportTemplate">
			<Params>
				<Param Name="DriveId" Label=" Shared DriveId" RequiredIf="DriveType==drive" VisibleIf="DriveType==drive" Key="driveId" Type="Query" 
				OptionsEndPoint="list_shared_drives"  Desc="By default file lists from MyDrive but if you like to search other Shared drive (formally known as Team drive) then set this parameter." 
					OptionsEndPointValueColumn="Id" OptionsEndPointLabelColumn="Name" />

				<Param Name="DriveType" Label=" Drive Type" Key="corpora" Required="True" Value="user" Options=";My Drive=user;Shared Drive=drive;" Type="Query" 
					Desc="Default search context is User's drive. Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'Query' parameter."/>
				
				<Param Name="SupportsAllDrives" Key="supportsAllDrives" Value="true" Label=" Supports all drives (e.g. My and Shared)" Desc="Whether the requesting application supports both My Drives and shared drives." Type="Query" Options=";true;false" Hidden="True" />				
			    <Param Name="ContineOn404Error" Label=" Continue processing on 404 error" Type="Property" Value="False" Options="False;True" Hidden="False" />
			</Params>	 			
		</EndPoint>
		
		<EndPoint Name="ListSharedDrivesTemplate">
			<Params>
				<Param Name="NextUrlAttributeOrExpr"
						Value="$.nextPageToken"
						Type="Property"/>
				<Param Name="NextUrlSuffix"
						Value="pageToken=&lt;%nextlink%&gt;"
						Type="Property"/>
				<Param Name="pageSize" Label="PageSize" Type="Query" Value="100" Hidden="True" />
				
				<Param Name="Query" Key="q" Label=" Search Criteria (Keep blank to get all)" 
					Type="Query" Options="None=;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 created time=createdTime > '2012-06-04T12:00:00'" Desc="File list filter" HelpLink="https://developers.google.com/drive/api/v3/search-files#query_string_examples"/>
				
				<Param Name="useDomainAdminAccess" Label="UseDomainAdminAccess" 
					Type="Query" Options=";true;false" Desc="Some operations such as searching for shared drives with specific attributes might need Admin access (set this to true)"/>
			</Params>
			<OutputColumns>
				<Column Name="id" DataType="DT_WSTR" Label="Id" Length="500" />
				<Column Name="name" DataType="DT_WSTR" Label="Name" Length="50" />
				<Column Name="colorRgb" DataType="DT_WSTR" Label="ColorRgb" Length="100" />
				<Column Name="kind" DataType="DT_WSTR" Label="Kind" Length="500" />
				<Column Name="backgroundImageLink" DataType="DT_WSTR" Label="BackgroundImageLink" Length="1000" />
				<Column Name="capabilities.canAddChildren" DataType="DT_BOOL" Label="CanAddChildren" />
				<Column Name="capabilities.canComment" DataType="DT_BOOL" Label="CanComment" />
				<Column Name="capabilities.canCopy" DataType="DT_BOOL" Label="CanCopy" />
				<Column Name="capabilities.canDeleteDrive" DataType="DT_BOOL" Label="CanDeleteDrive" />
				<Column Name="capabilities.canDownload" DataType="DT_BOOL" Label="CanDownload" />
				<Column Name="capabilities.canEdit" DataType="DT_BOOL" Label="CanEdit" />
				<Column Name="capabilities.canListChildren" DataType="DT_BOOL" Label="CanListChildren" />
				<Column Name="capabilities.canManageMembers" DataType="DT_BOOL" Label="CanManageMembers" />
				<Column Name="capabilities.canReadRevisions" DataType="DT_BOOL" Label="CanReadRevisions" />
				<Column Name="capabilities.canRename" DataType="DT_BOOL" Label="CanRename" />
				<Column Name="capabilities.canRenameDrive" DataType="DT_BOOL" Label="CanRenameDrive" />
				<Column Name="capabilities.canChangeDriveBackground" DataType="DT_BOOL" Label="CanChangeDriveBackground" />
				<Column Name="capabilities.canShare" DataType="DT_BOOL" Label="CanShare" />
				<Column Name="capabilities.canChangeCopyRequiresWriterPermissionRestriction" DataType="DT_BOOL" Label="CanChangeCopyRequiresWriterPermissionRestriction" />
				<Column Name="capabilities.canChangeDomainUsersOnlyRestriction" DataType="DT_BOOL" Label="CanChangeDomainUsersOnlyRestriction" />
				<Column Name="capabilities.canChangeDriveMembersOnlyRestriction" DataType="DT_BOOL" Label="CanChangeDriveMembersOnlyRestriction" />
				<Column Name="capabilities.canChangeSharingFoldersRequiresOrganizerPermissionRestriction" DataType="DT_BOOL" Label="CanChangeSharingFoldersRequiresOrganizerPermissionRestriction" />
				<Column Name="capabilities.canResetDriveRestrictions" DataType="DT_BOOL" Label="CanResetDriveRestrictions" />
				<Column Name="capabilities.canDeleteChildren" DataType="DT_BOOL" Label="CanDeleteChildren" />
				<Column Name="capabilities.canTrashChildren" DataType="DT_BOOL" Label="CanTrashChildren" />
				<Column Name="createdTime" DataType="DT_DBTIMESTAMP" Label="CreatedTime" />
				<Column Name="hidden" DataType="DT_BOOL" Label="Hidden" />
				<Column Name="restrictions.copyRequiresWriterPermission" DataType="DT_BOOL" Label="CopyRequiresWriterPermission" />
				<Column Name="restrictions.domainUsersOnly" DataType="DT_BOOL" Label="DomainUsersOnly" />
				<Column Name="restrictions.driveMembersOnly" DataType="DT_BOOL" Label="DriveMembersOnly" />
				<Column Name="restrictions.adminManagedRestrictions" DataType="DT_BOOL" Label="AdminManagedRestrictions" />
				<Column Name="restrictions.sharingFoldersRequiresOrganizerPermission" DataType="DT_BOOL" Label="SharingFoldersRequiresOrganizerPermission" />
			</OutputColumns>
		</EndPoint>
		
		<EndPoint Name="ListItemsTemplate"  
					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="DriveId" Label=" Shared DriveId" RequiredIf="DriveType==drive" VisibleIf="DriveType==drive" Key="driveId" Type="Query" OptionsEndPoint="list_shared_drives"  Desc="By default file lists from MyDrive but if you like to search other Shared drive (formally known as Team drive) then set this parameter." 
					OptionsEndPointValueColumn="Id" OptionsEndPointLabelColumn="Name" />

				<Param Name="DriveType" Label=" Drive Type" Key="corpora" Type="Query" Required="True" Value="user" Options=";My Drive=user;Shared Drive=drive;All Drives=allDrives;" 
					Desc="Default search context is User's drive. Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'Query' parameter."/>

			
				<Param Name="NextUrlAttributeOrExpr" Value="$.nextPageToken" Type="Property"/>
				<Param Name="NextUrlSuffix" Value="pageToken=&lt;%nextlink%&gt;" Type="Property"/>
				<Param Name="pageSize" Label="PageSize" Type="Query" Value="1000" Hidden="True" />
				
					
				<Param Name="SupportsAllDrives" Key="supportsAllDrives" Value="true" Label=" Supports all drives (e.g. My and Shared)" Desc="Whether the requesting application supports both My Drives and shared drives." Type="Query" Options=";true;false" Hidden="True" />				

				<Param Name="IncludeItemsFromAllDrives" Value="true" VisibleIf="DriveType==allDrives | DriveId " Key="includeItemsFromAllDrives" Options=";true;false" Type="Query" Label=" Include items from all drives (e.g. My and Shared)" />
				<Param Name="Spaces" Key="spaces" Label=" Spaces to include in corpora (comma separed)" Type="Query"/>				
				
				<Param Name="IncludePermissionsForView" Key="includePermissionsForView" Label=" Include Permissions For View" Options=";true;false" Type="Query"/>
				<Param Name="IncludeLabels" Key="includeLabels" Label=" Include Labels" Options=";true;false" Type="Query"/>
				
				<Param Name="Query" Key="q" Label=" Search Criteria" Type="Query" Value="trashed!=true"
					   Options="None=;
					   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 created time=createdTime > '2012-06-04T12:00:00';
					   By modified time=modifiedTime > '2012-06-04T12:00:00';
					   Allow only shared files and folders=sharedWithMe=true; 
					   Exclude trashed files or folders=trashed=false;
					   Exclude Folders=mimeType!='application/vnd.google-apps.folder';
					   Include files from trash=mimeType!='application/vnd.google-apps.folder';					   
					   Exclude files from trash=mimeType!='application/vnd.google-apps.folder' and trashed!=true;						   
					   Exclude App Script=mimeType!='application/vnd.google-apps.script';
					   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"/>
				
				<Column Name="driveId" DataType="DT_WSTR" Label="DriveId" Length="500" />
				
				<Column Name="copyRequiresWriterPermission" DataType="DT_BOOL" Label="CopyRequiresWriterPermission" />
				<Column Name="md5Checksum" DataType="DT_WSTR" Label="Md5Checksum" Length="500" />
				<Column Name="writersCanShare" DataType="DT_BOOL" Label="WritersCanShare" />
				<Column Name="viewedByMe" DataType="DT_BOOL" Label="ViewedByMe" />
				<Column Name="parents" DataType="DT_WSTR" Label="Parents" Length="500" />
				<Column Name="thumbnailLink" DataType="DT_WSTR" Label="ThumbnailLink" Length="4000" />
				<Column Name="iconLink" DataType="DT_WSTR" Label="IconLink" Length="1000" />

				<Column Name="lastModifyingUser.displayName" DataType="DT_WSTR" Label="LastModifyingUserDisplayName" Length="500" />
				<Column Name="lastModifyingUser.kind" DataType="DT_WSTR" Label="LastModifyingUserKind" Length="100" />
				<Column Name="lastModifyingUser.me" DataType="DT_BOOL" Label="LastModifyingUserMe" />
				<Column Name="lastModifyingUser.permissionId" DataType="DT_WSTR" Label="LastModifyingUserPermissionId" Length="500" />
				<Column Name="lastModifyingUser.emailAddress" DataType="DT_WSTR" Label="LastModifyingUserEmailAddress" Length="500" />
				<Column Name="lastModifyingUser.photoLink" DataType="DT_WSTR" Label="LastModifyingUserPhotoLink" Length="1000" />
				<Column Name="owners" DataType="DT_WSTR" Label="Owners" Length="4000" />
				<Column Name="headRevisionId" DataType="DT_WSTR" Label="HeadRevisionId" Length="1000" />
				<Column Name="webViewLink" DataType="DT_WSTR" Label="WebViewLink" Length="1000" />
				<Column Name="webContentLink" DataType="DT_WSTR" Label="WebContentLink" Length="1000" />

				<Column Name="viewersCanCopyContent" DataType="DT_BOOL" Label="ViewersCanCopyContent" />
				<Column Name="permissions" DataType="DT_WSTR" Label="Permissions" Length="4000" />
				<Column Name="hasThumbnail" DataType="DT_BOOL" Label="HasThumbnail" />
				<Column Name="spaces" DataType="DT_WSTR" Label="Spaces" Length="500" />

				<Column Name="explicitlyTrashed" DataType="DT_BOOL" Label="ExplicitlyTrashed" />

				<Column Name="modifiedByMeTime" DataType="DT_DBTIMESTAMP" Label="ModifiedByMeTime" />
				<Column Name="viewedByMeTime" DataType="DT_DBTIMESTAMP" Label="ViewedByMeTime" />
				<Column Name="quotaBytesUsed" DataType="DT_WSTR" Label="QuotaBytesUsed" Length="50" />

				<Column Name="originalFilename" DataType="DT_WSTR" Label="OriginalFilename" Length="500" />
				<Column Name="ownedByMe" DataType="DT_BOOL" Label="OwnedByMe" />
				<Column Name="fullFileExtension" DataType="DT_WSTR" Label="FullFileExtension" Length="50" />
				<Column Name="isAppAuthorized" DataType="DT_BOOL" Label="IsAppAuthorized" />
				<Column Name="capabilities.canChangeViewersCanCopyContent" DataType="DT_BOOL" Label="CanChangeViewersCanCopyContent" />
				<Column Name="capabilities.canEdit" DataType="DT_BOOL" Label="CanEdit" />
				<Column Name="capabilities.canCopy" DataType="DT_BOOL" Label="CanCopy" />
				<Column Name="capabilities.canComment" DataType="DT_BOOL" Label="CanComment" />
				<Column Name="capabilities.canAddChildren" DataType="DT_BOOL" Label="CanAddChildren" />
				<Column Name="capabilities.canDelete" DataType="DT_BOOL" Label="CanDelete" />
				<Column Name="capabilities.canDownload" DataType="DT_BOOL" Label="CanDownload" />
				<Column Name="capabilities.canListChildren" DataType="DT_BOOL" Label="CanListChildren" />
				<Column Name="capabilities.canRemoveChildren" DataType="DT_BOOL" Label="CanRemoveChildren" />
				<Column Name="capabilities.canRename" DataType="DT_BOOL" Label="CanRename" />
				<Column Name="capabilities.canTrash" DataType="DT_BOOL" Label="CanTrash" />
				<Column Name="capabilities.canReadRevisions" DataType="DT_BOOL" Label="CanReadRevisions" />
				<Column Name="capabilities.canChangeCopyRequiresWriterPermission" DataType="DT_BOOL" Label="CanChangeCopyRequiresWriterPermission" />
				<Column Name="capabilities.canMoveItemIntoTeamDrive" DataType="DT_BOOL" Label="CanMoveItemIntoTeamDrive" />
				<Column Name="capabilities.canUntrash" DataType="DT_BOOL" Label="CanUntrash" />
				<Column Name="capabilities.canModifyContent" DataType="DT_BOOL" Label="CanModifyContent" />
				<Column Name="capabilities.canMoveItemOutOfDrive" DataType="DT_BOOL" Label="CanMoveItemOutOfDrive" />
				<Column Name="capabilities.canAddMyDriveParent" DataType="DT_BOOL" Label="CanAddMyDriveParent" />
				<Column Name="capabilities.canRemoveMyDriveParent" DataType="DT_BOOL" Label="CanRemoveMyDriveParent" />
				<Column Name="capabilities.canMoveItemWithinDrive" DataType="DT_BOOL" Label="CanMoveItemWithinDrive" />
				<Column Name="capabilities.canShare" DataType="DT_BOOL" Label="CanShare" />
				<Column Name="capabilities.canMoveChildrenWithinDrive" DataType="DT_BOOL" Label="CanMoveChildrenWithinDrive" />
				<Column Name="capabilities.canModifyContentRestriction" DataType="DT_BOOL" Label="CanModifyContentRestriction" />
				<Column Name="capabilities.canChangeSecurityUpdateEnabled" DataType="DT_BOOL" Label="CanChangeSecurityUpdateEnabled" />
				<Column Name="capabilities.canAcceptOwnership" DataType="DT_BOOL" Label="CanAcceptOwnership" />
				<Column Name="capabilities.canReadLabels" DataType="DT_BOOL" Label="CanReadLabels" />
				<Column Name="capabilities.canModifyLabels" DataType="DT_BOOL" Label="CanModifyLabels" />
				<Column Name="capabilities.canModifyEditorContentRestriction" DataType="DT_BOOL" Label="CanModifyEditorContentRestriction" />
				<Column Name="capabilities.canModifyOwnerContentRestriction" DataType="DT_BOOL" Label="CanModifyOwnerContentRestriction" />
				<Column Name="capabilities.canRemoveContentRestriction" DataType="DT_BOOL" Label="CanRemoveContentRestriction" />
				<Column Name="capabilities.canMoveChildrenOutOfDrive" DataType="DT_BOOL" Label="CanMoveChildrenOutOfDrive" />
				<Column Name="capabilities.canReadDrive" DataType="DT_BOOL" Label="CanReadDrive" />
				<Column Name="capabilities.canReadTeamDrive" DataType="DT_BOOL" Label="CanReadTeamDrive" />
				<Column Name="capabilities.canMoveTeamDriveItem" DataType="DT_BOOL" Label="CanMoveTeamDriveItem" />
				<Column Name="capabilities.canMoveItemWithinTeamDrive" DataType="DT_BOOL" Label="CanMoveItemWithinTeamDrive" />
				<Column Name="capabilities.canMoveItemOutOfTeamDrive" DataType="DT_BOOL" Label="CanMoveItemOutOfTeamDrive" />
				<Column Name="capabilities.canDeleteChildren" DataType="DT_BOOL" Label="CanDeleteChildren" />
				<Column Name="capabilities.canMoveChildrenOutOfTeamDrive" DataType="DT_BOOL" Label="CanMoveChildrenOutOfTeamDrive" />
				<Column Name="capabilities.canMoveChildrenWithinTeamDrive" DataType="DT_BOOL" Label="CanMoveChildrenWithinTeamDrive" />
				<Column Name="capabilities.canTrashChildren" DataType="DT_BOOL" Label="CanTrashChildren" />
				<Column Name="capabilities.canAddFolderFromAnotherDrive" DataType="DT_BOOL" Label="CanAddFolderFromAnotherDrive" />

				
				<Column Name="thumbnailVersion" DataType="DT_WSTR" Label="ThumbnailVersion" Length="50" />
				<Column Name="modifiedByMe" DataType="DT_BOOL" Label="ModifiedByMe" />
				<Column Name="permissionIds" DataType="DT_WSTR" Label="PermissionIds" Length="500" />
				<Column Name="imageMediaMetadata.width" DataType="DT_I4" Label="ImageMediaMetadataWidth" />
				<Column Name="imageMediaMetadata.height" DataType="DT_I4" Label="ImageMediaMetadataHeight" />
				<Column Name="imageMediaMetadata.rotation" DataType="DT_I4" Label="ImageMediaMetadataRotation" />
				<Column Name="linkShareMetadata.securityUpdateEligible" DataType="DT_BOOL" Label="LinkShareMetadataSecurityUpdateEligible" />
				<Column Name="linkShareMetadata.securityUpdateEnabled" DataType="DT_BOOL" Label="LinkShareMetadataSecurityUpdateEnabled" />
				<Column Name="sha1Checksum" DataType="DT_WSTR" Label="Sha1Checksum" Length="500" />
				<Column Name="sha256Checksum" DataType="DT_WSTR" Label="Sha256Checksum" Length="1000" />
				<Column Name="hasAugmentedPermissions" DataType="DT_BOOL" Label="HasAugmentedPermissions" />
			</OutputColumns>			

		</EndPoint>

		<EndPoint Name="DeleteItemTemplate"  Template="DriveSupportTemplate" 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"
				       Label=" File Id"
					   OptionsEndPoint="list_items"
					   OptionsEndPointValueColumn="Id"
					   IsKey="True"
					   Required="True"
					   OptionsEndPointLabelColumn="Name"
					   OptionsEndPointParameters="DriveId=[$DriveId$];DriveType=[$DriveType$];SupportsAllDrives=true"
					   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>
			<InputColumns>
				<Column Name="Id" DataType="DT_WSTR" MapToParam="True" Key="True" />
			</InputColumns>			
		</EndPoint>
	</Template>

	<EndPoints>
		<!--=====================================
        ========= GET ABOUT INFO ============
        =====================================-->
		<EndPoint Name="get_about" Label="Get my drive info" Desc="Gets my 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_WSTR" />
				<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 DRIVES ===============
        =======================================-->
		<EndPoint Name="list_shared_drives" Template="ListSharedDrivesTemplate" Label="Lists shared drives" Desc="Lists the user's shared drives (i.e. formally known as team drive) with optional search criteria"
					Url="/drive/v3/drives?fields=nextPageToken,drives(*)" Method="GET" Filter="$.drives[*]" HelpLink="https://developers.google.com/drive/api/v3/reference/drives/list">
		</EndPoint>


		<!--=====================================
        ============ LIST ITEMS =============
        =====================================-->
		
		<EndPoint Name="list_files" Template="ListItemsTemplate" Label="List files" Desc="List files / folders with search criteria"
					Url="/drive/v3/files?fields=nextPageToken,files(*)" >
			<Params>
				<Param Name="Query" Key="q" Label=" Search Criteria" Type="Query" Hidden="False" Value="mimeType!='application/vnd.google-apps.folder' AND trashed!=true" 
					   Options="None=;
					   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 created time=createdTime > '2012-06-04T12:00:00';
					   By modified time=modifiedTime > '2012-06-04T12:00:00';
					   Allow only shared files and folders=sharedWithMe=true; 
					   Exclude trashed files=trashed=false;
					   Include files from trash=mimeType!='application/vnd.google-apps.folder';					   
					   Exclude files from trash=mimeType!='application/vnd.google-apps.folder' and trashed!=true;					   
					   Exclude Folders=mimeType!='application/vnd.google-apps.folder';
					   Exclude App Script=mimeType!='application/vnd.google-apps.script';
					   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"   
					   />					
			</Params>
		</EndPoint>

		<!--=====================================
        ============ LIST ITEMS =============
        =====================================-->
		<EndPoint Name="list_items" Template="ListItemsTemplate" Label="Search items (i.e. files / folders)" Desc="Lists items (i.e. files / folders) with search criteria"
					Url="/drive/v3/files?fields=nextPageToken,files(*)" >
		</EndPoint>
		
		<!--=======================================
        ============ LIST FOLDERS =============
        =======================================-->
		<EndPoint Name="list_folders" Template="ListItemsTemplate" Label="List folders" Desc="Lists folders" >
			<Params>
				<Param Name="Query" Key="q" Label=" Search Criteria" Type="Query" Hidden="False" Value="mimeType='application/vnd.google-apps.folder' and trashed!=true" 
					   Options="None=;
					   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 created time=createdTime > '2012-06-04T12:00:00';
					   Include folders from trash=mimeType='application/vnd.google-apps.folder';
					   Exclude folders from trash=mimeType='application/vnd.google-apps.folder' and trashed!=true;
					   By modified time=modifiedTime > '2012-06-04T12:00:00';
					   Allow only shared files and folders=sharedWithMe=true; 
					   Exclude trashed files=trashed=false;
					   Exclude Folders=mimeType!='application/vnd.google-apps.folder';
					   Exclude App Script=mimeType!='application/vnd.google-apps.script';
					   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"   
					   />				
			</Params>
		</EndPoint>

		<!--=======================================
        ======== LIST DELETED FILES ===========
        =======================================-->
		<EndPoint Name="list_deleted_files" Template="ListItemsTemplate" Label="List deleted files / folders" Desc="Lists only deleted files / folders from trash">
			<Params>
				<Param Name="Query" Key="q" Label="Search Criteria" Type="Query" Value="trashed=true" Hidden="False"/>
			</Params>
		</EndPoint>

		<!--=====================================
        ========== GET FILE INFO ============
        =====================================-->
		<EndPoint Name="get_file_info" Template="DriveSupportTemplate" 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"
					   OptionsEndPointParameters="DriveId=[$DriveId$];DriveType=[$DriveType$];SupportsAllDrives=true;"
					   OptionsEndPointValueColumn="Id"
					   OptionsEndPointLabelColumn="Name"
					   Desc="Id of a file you want to see information for"
					   Required="True"
					   IsKey="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"/>
				
				<Column Name="driveId" DataType="DT_WSTR" Label="DriveId" Length="500" />
				
				<Column Name="copyRequiresWriterPermission" DataType="DT_BOOL" Label="CopyRequiresWriterPermission" />
				<Column Name="md5Checksum" DataType="DT_WSTR" Label="Md5Checksum" Length="500" />
				<Column Name="writersCanShare" DataType="DT_BOOL" Label="WritersCanShare" />
				<Column Name="viewedByMe" DataType="DT_BOOL" Label="ViewedByMe" />
				<Column Name="parents" DataType="DT_WSTR" Label="Parents" Length="500" />
				<Column Name="thumbnailLink" DataType="DT_WSTR" Label="ThumbnailLink" Length="4000" />
				<Column Name="iconLink" DataType="DT_WSTR" Label="IconLink" Length="1000" />

				<Column Name="lastModifyingUser.displayName" DataType="DT_WSTR" Label="LastModifyingUserDisplayName" Length="500" />
				<Column Name="lastModifyingUser.kind" DataType="DT_WSTR" Label="LastModifyingUserKind" Length="100" />
				<Column Name="lastModifyingUser.me" DataType="DT_BOOL" Label="LastModifyingUserMe" />
				<Column Name="lastModifyingUser.permissionId" DataType="DT_WSTR" Label="LastModifyingUserPermissionId" Length="500" />
				<Column Name="lastModifyingUser.emailAddress" DataType="DT_WSTR" Label="LastModifyingUserEmailAddress" Length="500" />
				<Column Name="lastModifyingUser.photoLink" DataType="DT_WSTR" Label="LastModifyingUserPhotoLink" Length="1000" />
				<Column Name="owners" DataType="DT_WSTR" Label="Owners" Length="4000" />
				<Column Name="headRevisionId" DataType="DT_WSTR" Label="HeadRevisionId" Length="1000" />
				<Column Name="webViewLink" DataType="DT_WSTR" Label="WebViewLink" Length="1000" />
				<Column Name="webContentLink" DataType="DT_WSTR" Label="WebContentLink" Length="1000" />

				<Column Name="viewersCanCopyContent" DataType="DT_BOOL" Label="ViewersCanCopyContent" />
				<Column Name="permissions" DataType="DT_WSTR" Label="Permissions" Length="4000" />
				<Column Name="hasThumbnail" DataType="DT_BOOL" Label="HasThumbnail" />
				<Column Name="spaces" DataType="DT_WSTR" Label="Spaces" Length="500" />

				<Column Name="explicitlyTrashed" DataType="DT_BOOL" Label="ExplicitlyTrashed" />

				<Column Name="modifiedByMeTime" DataType="DT_DBTIMESTAMP" Label="ModifiedByMeTime" />
				<Column Name="viewedByMeTime" DataType="DT_DBTIMESTAMP" Label="ViewedByMeTime" />
				<Column Name="quotaBytesUsed" DataType="DT_WSTR" Label="QuotaBytesUsed" Length="50" />

				<Column Name="originalFilename" DataType="DT_WSTR" Label="OriginalFilename" Length="500" />
				<Column Name="ownedByMe" DataType="DT_BOOL" Label="OwnedByMe" />
				<Column Name="fullFileExtension" DataType="DT_WSTR" Label="FullFileExtension" Length="50" />
				<Column Name="isAppAuthorized" DataType="DT_BOOL" Label="IsAppAuthorized" />
				<Column Name="capabilities.canChangeViewersCanCopyContent" DataType="DT_BOOL" Label="CanChangeViewersCanCopyContent" />
				<Column Name="capabilities.canEdit" DataType="DT_BOOL" Label="CanEdit" />
				<Column Name="capabilities.canCopy" DataType="DT_BOOL" Label="CanCopy" />
				<Column Name="capabilities.canComment" DataType="DT_BOOL" Label="CanComment" />
				<Column Name="capabilities.canAddChildren" DataType="DT_BOOL" Label="CanAddChildren" />
				<Column Name="capabilities.canDelete" DataType="DT_BOOL" Label="CanDelete" />
				<Column Name="capabilities.canDownload" DataType="DT_BOOL" Label="CanDownload" />
				<Column Name="capabilities.canListChildren" DataType="DT_BOOL" Label="CanListChildren" />
				<Column Name="capabilities.canRemoveChildren" DataType="DT_BOOL" Label="CanRemoveChildren" />
				<Column Name="capabilities.canRename" DataType="DT_BOOL" Label="CanRename" />
				<Column Name="capabilities.canTrash" DataType="DT_BOOL" Label="CanTrash" />
				<Column Name="capabilities.canReadRevisions" DataType="DT_BOOL" Label="CanReadRevisions" />
				<Column Name="capabilities.canChangeCopyRequiresWriterPermission" DataType="DT_BOOL" Label="CanChangeCopyRequiresWriterPermission" />
				<Column Name="capabilities.canMoveItemIntoTeamDrive" DataType="DT_BOOL" Label="CanMoveItemIntoTeamDrive" />
				<Column Name="capabilities.canUntrash" DataType="DT_BOOL" Label="CanUntrash" />
				<Column Name="capabilities.canModifyContent" DataType="DT_BOOL" Label="CanModifyContent" />
				<Column Name="capabilities.canMoveItemOutOfDrive" DataType="DT_BOOL" Label="CanMoveItemOutOfDrive" />
				<Column Name="capabilities.canAddMyDriveParent" DataType="DT_BOOL" Label="CanAddMyDriveParent" />
				<Column Name="capabilities.canRemoveMyDriveParent" DataType="DT_BOOL" Label="CanRemoveMyDriveParent" />
				<Column Name="capabilities.canMoveItemWithinDrive" DataType="DT_BOOL" Label="CanMoveItemWithinDrive" />
				<Column Name="capabilities.canShare" DataType="DT_BOOL" Label="CanShare" />
				<Column Name="capabilities.canMoveChildrenWithinDrive" DataType="DT_BOOL" Label="CanMoveChildrenWithinDrive" />
				<Column Name="capabilities.canModifyContentRestriction" DataType="DT_BOOL" Label="CanModifyContentRestriction" />
				<Column Name="capabilities.canChangeSecurityUpdateEnabled" DataType="DT_BOOL" Label="CanChangeSecurityUpdateEnabled" />
				<Column Name="capabilities.canAcceptOwnership" DataType="DT_BOOL" Label="CanAcceptOwnership" />
				<Column Name="capabilities.canReadLabels" DataType="DT_BOOL" Label="CanReadLabels" />
				<Column Name="capabilities.canModifyLabels" DataType="DT_BOOL" Label="CanModifyLabels" />
				<Column Name="capabilities.canModifyEditorContentRestriction" DataType="DT_BOOL" Label="CanModifyEditorContentRestriction" />
				<Column Name="capabilities.canModifyOwnerContentRestriction" DataType="DT_BOOL" Label="CanModifyOwnerContentRestriction" />
				<Column Name="capabilities.canRemoveContentRestriction" DataType="DT_BOOL" Label="CanRemoveContentRestriction" />
				<Column Name="capabilities.canMoveChildrenOutOfDrive" DataType="DT_BOOL" Label="CanMoveChildrenOutOfDrive" />
				<Column Name="capabilities.canReadDrive" DataType="DT_BOOL" Label="CanReadDrive" />
				<Column Name="capabilities.canReadTeamDrive" DataType="DT_BOOL" Label="CanReadTeamDrive" />
				<Column Name="capabilities.canMoveTeamDriveItem" DataType="DT_BOOL" Label="CanMoveTeamDriveItem" />
				<Column Name="capabilities.canMoveItemWithinTeamDrive" DataType="DT_BOOL" Label="CanMoveItemWithinTeamDrive" />
				<Column Name="capabilities.canMoveItemOutOfTeamDrive" DataType="DT_BOOL" Label="CanMoveItemOutOfTeamDrive" />
				<Column Name="capabilities.canDeleteChildren" DataType="DT_BOOL" Label="CanDeleteChildren" />
				<Column Name="capabilities.canMoveChildrenOutOfTeamDrive" DataType="DT_BOOL" Label="CanMoveChildrenOutOfTeamDrive" />
				<Column Name="capabilities.canMoveChildrenWithinTeamDrive" DataType="DT_BOOL" Label="CanMoveChildrenWithinTeamDrive" />
				<Column Name="capabilities.canTrashChildren" DataType="DT_BOOL" Label="CanTrashChildren" />
				<Column Name="capabilities.canAddFolderFromAnotherDrive" DataType="DT_BOOL" Label="CanAddFolderFromAnotherDrive" />

				
				<Column Name="thumbnailVersion" DataType="DT_WSTR" Label="ThumbnailVersion" Length="50" />
				<Column Name="modifiedByMe" DataType="DT_BOOL" Label="ModifiedByMe" />
				<Column Name="permissionIds" DataType="DT_WSTR" Label="PermissionIds" Length="500" />
				<Column Name="imageMediaMetadata.width" DataType="DT_I4" Label="ImageMediaMetadataWidth" />
				<Column Name="imageMediaMetadata.height" DataType="DT_I4" Label="ImageMediaMetadataHeight" />
				<Column Name="imageMediaMetadata.rotation" DataType="DT_I4" Label="ImageMediaMetadataRotation" />
				<Column Name="linkShareMetadata.securityUpdateEligible" DataType="DT_BOOL" Label="LinkShareMetadataSecurityUpdateEligible" />
				<Column Name="linkShareMetadata.securityUpdateEnabled" DataType="DT_BOOL" Label="LinkShareMetadataSecurityUpdateEnabled" />
				<Column Name="sha1Checksum" DataType="DT_WSTR" Label="Sha1Checksum" Length="500" />
				<Column Name="sha256Checksum" DataType="DT_WSTR" Label="Sha256Checksum" Length="1000" />
				<Column Name="hasAugmentedPermissions" DataType="DT_BOOL" Label="HasAugmentedPermissions" />
			</OutputColumns>			
		</EndPoint>


		<!--=====================================
        ========= DOWNLOAD A FILE ===========
        =====================================-->
		<EndPoint Name="download_file" Template="DriveSupportTemplate" 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"
					  OptionsEndPointParameters="DriveId=[$DriveId$];DriveType=[$DriveType$];SupportsAllDrives=true;"
					  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" Label=" Overwrite Mode" Type="Property" Value="AlwaysOverwrite" Required="True"/>
				<Param Name="ResponseDataFile" Label=" Local File Path" Required="True" Type="Property" Value="c:\somefolder\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" Template="DriveSupportTemplate" 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="DriveId=[$DriveId$];DriveType=[$DriveType$];SupportsAllDrives=true;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" Label=" Overwrite Mode" Type="Property" Value="AlwaysOverwrite" Required="True"/>
				<Param Name="ResponseDataFile"  Label=" Local File Path" Required="True" Type="Property" Value="c:\somefolder\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" TemplateXX="DriveSupportTemplate" Desc="Uploads a file (resumable)"
				  Url="/upload/drive/v3/files?uploadType=resumable" Method="POST" 
				  OutputHeaders="Location"
				  ContentType="application/json"
			  HelpLink="https://developers.google.com/drive/api/reference/rest/v3/files/create"
              >
			<Params>
				<Param Name="KeepRevisionForever"
					   Key="keepRevisionForever"
					   Label=" Keep Revision Forever"
					   Required="False"
					   Type="Query"
					   Hidden="False"
					   Options=";true;false"
					   Desc="Defines whether uploaded file has revisions"
					   Value=""
              />
			  
			 <Param Name="ParentFolderId"
						Label=" Parent FolderId"
						Type="Placeholder"
						OptionsEndPoint="list_folders"
						OptionsEndPointValueColumn="Id"
						OptionsEndPointLabelColumn="Name"
						OptionsEndPointParameters="DriveId=[$DriveId$];DriveType=[$DriveType$];SupportsAllDrives=true"
						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="DriveId" Label=" Shared DriveId" VisibleIf="DriveType==drive" Key="driveId" OptionsEndPoint="list_shared_drives"  Desc="By default file lists from MyDrive but if you like to search other Shared drive then set this parameter." 
					OptionsEndPointValueColumn="Id" OptionsEndPointLabelColumn="Name" />

				<Param Name="DriveType" Label=" Drive Type" Key="corpora" Value="user" Options=";My Drive=user;Shared Drive=drive;" 
					Desc="Default search context is User's drive. Bodies of items (files/documents) to which the query applies. Supported bodies are 'user', 'domain', 'drive', and 'allDrives'. Prefer 'user' or 'drive' to 'allDrives' for efficiency. By default, corpora is set to 'user'. However, this can change depending on the filter set through the 'Query' parameter."/>

				<Param Name="SupportsAllDrives" Key="supportsAllDrives" Value="true" Label=" Supports all drives (e.g. My and Shared)" Desc="Whether the requesting application supports both My Drives and shared drives." Type="Query" Options=";true;false" Hidden="True" />				
			
				<Param Name="FileName"
					   Label=" Target FileName"	
					   Required="True"
					   Type="Placeholder"
					   Desc="A filename the file will have in Google Drive"
					   Example="myfile.ext"
					   Value="myfile.ext"
              />
				<Param Name="DiskFilePath"
				        Label=" Local FilePath"
						Required="True"
						Type="Placeholder"
						Desc="Specify a disk file path"
						Example="C:\somefolder\file.ext"
						Editor="FileOpen"
						Value=""
              />
		
		       
				<Param Name="RawOutputDataRowTemplate" Type="Property" Value="{Status:'Uploaded'}" Target="upload_file" />
				<Param Name="EnableRawOutputModeSingleRow" Type="Property" Value="True" Target="upload_file" />

				<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$]"
					,"temDriveId": "[$DriveId$]"
                    ,"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$]"  />
				<Column Name="id" Label="DriveId" DataType="DT_WSTR" ValueTemplate="[$DriveId$]"  />
			</OutputColumns>
		</EndPoint>


		<!--=====================================
        ========== CREATE FOLDER ============
        =====================================-->
		<EndPoint Name="create_folder" Template="DriveSupportTemplate" 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"
					   Label=" Name"
					   Required="True"
					   Type="Placeholder"
					   Desc="A folder name the folder will have in Google Drive"
					   Example="MyFolder"
					   Value="MyFolder"
                 />
				<Param Name="ParentFolderId"
					   Label=" Parent FolderId"
					   Type="Placeholder"
					   OptionsEndPoint="list_folders"
					   OptionsEndPointValueColumn="Id"
					   OptionsEndPointLabelColumn="Name"
					   OptionsEndPointParameters="DriveId=[$DriveId$];DriveType=[$DriveType$];SupportsAllDrives=true"
					   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$]"
					,"mimeType" : "application/vnd.google-apps.folder"
                    ,"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" />
				<Column Name="id" Label="DriveId" DataType="DT_WSTR" ValueTemplate="[$DriveId$]"  />
			</OutputColumns>
		</EndPoint>


		<!--=====================================
        ========= DELETE AN ITEM ============
        =====================================-->
		<EndPoint Name="delete_item" Template="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"
              >
		</EndPoint>

		<!--=====================================
        =========== COPY AN ITEM ============
        =====================================-->
		<EndPoint Name="copy_file" Template="DriveSupportTemplate" 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"
				       Label=" File Id"
					   Type="Placeholder"
					   OptionsEndPoint="list_items"
					   OptionsEndPointValueColumn="Id"
					   OptionsEndPointLabelColumn="Name"
					   OptionsEndPointParameters="DriveId=[$DriveId$];DriveType=[$DriveType$];SupportsAllDrives=true"
					   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"/>
				<Column Name="driveId" Label="DriveId" DataType="DT_WSTR" />
			</OutputColumns>
		</EndPoint>

		<!--=====================================
        ========= UPDATE A FILE =============
        =====================================-->
		<EndPoint Name="update_file" Label="Replace file data (keep same file id)" Template="DriveSupportTemplate" Desc="Update file with new content / metadata (keep same file Id)"
					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"
					   Label=" File 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$]"  />
				<Column Name="driveId" Label="DriveId" DataType="DT_WSTR" />
			</OutputColumns>
		</EndPoint>

		<!--==============================================
       ========= UPDATE METADATA IN A FILE ==========
       ============================================== -->
		<EndPoint Name="update_metadata_file" Label="Update metadata in a file"  Template="DriveSupportTemplate"  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"
				       Label=" File 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=" Keep Revision Forever"
					   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" />
				<Column Name="driveId" Label="DriveId" DataType="DT_WSTR" />
			</OutputColumns>
		</EndPoint>

		<!--=====================================
        =========== EMPTY TRASH =============
        =====================================-->
		<EndPoint Name="empty_trash" Label="Empty trash" Desc="Empties trash"  Template="DriveSupportTemplate"
					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" />
				<Column Name="driveId" Label="DriveId" DataType="DT_WSTR" />
			</OutputColumns>
		</EndPoint>



		<!--=======================================
        ========== DELETE ALL FILES ===========
        =======================================-->

		<EndPoint Name="delete_all_items" Label="Delete all items" Template="ListItemsTemplate" 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="SharedDrives"
			   SelectEndPoint="list_shared_drives"
           />		   
		<Table Name="Files"
			   SelectEndPoint="list_files"
			   LookupEndPoint="get_file_info"
			   UpdateEndPoint="update_file"
			   DeleteEndPoint="delete_item"
			   InsertEndPoint="upload_file"
           />
		<Table Name="Folders"
			   SelectEndPoint="list_folders"
			   DeleteEndPoint="delete_item"
			   InsertEndPoint="create_folder"
			   LookupEndPoint="get_file_info"
           />
		   
		<Table Name="Trash"
			   SelectEndPoint="list_deleted_files"
			   DeleteEndPoint="empty_trash"
           />
		   
		 <!-- below depricated use Files and Folders tables-->  
		<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"
           />
		
	</Tables>


	<!--=====================================
      ============ EXAMPLES ===============
      =====================================-->
	<Examples>
	
		<Example Group="ODBC" Label="Get my drive information" Desc="Gets my drive information">
			<Code>
				<![CDATA[SELECT * FROM Drive]]>
			</Code>
		</Example>
		
		<Example Group="ODBC" Label="List all shared drives" Desc="List all shared drives">
			<Code>
				<![CDATA[SELECT * FROM SharedDrives --WITH(Query='name = "HR"')]]>
			</Code>
		</Example>	
		<Example Group="ODBC" Label="Get information about shared drive" Desc="Get information about shared drive">
			<Code>
				<![CDATA[SELECT * FROM SharedDrives WITH(Query='name = "HR"')]]>
			</Code>
		</Example>			
		
		<Example Group="ODBC" Label="List / search files from my drive" Desc="List or search files from my drive (use search query expression). Uncomment Query part to invoke filter">
			<Code>
				<![CDATA[SELECT * FROM Files
WITH(
	--Query='name  contains "ZappySys*.*"', --includes files where name contains "zappysys" word
)]]>
			</Code>
		</Example>	
		
		<Example Group="ODBC" Label="List / search files from a single shared drive" Desc="List or search files from a specific shared drive by driveId and search query expression. Uncomment Query part to invoke filter">
			<Code>
				<![CDATA[SELECT * FROM Files
WITH(
	--Query='name  contains "ZappySys*.*"', --includes files where name contains "zappysys" word
	DriveId='0AFWIggplk2z6Uk9PVA', 
	DriveType='drive',
	SupportsAllDrives='true',
	IncludeItemsFromAllDrives='true'
)]]>
			</Code>
		</Example>	
		<Example Group="ODBC" Label="List / search files from all shared drives" Desc="List or search files from all shared drives by driveId and search query expression. Uncomment Query part to invoke filter">
			<Code>
				<![CDATA[SELECT * FROM Files
WITH(
	--Query='name  contains "ZappySys*.*"', --includes files where name contains "zappysys" word
	DriveType='allDrives',
	SupportsAllDrives='true',
	IncludeItemsFromAllDrives='true'
)
]]>
			</Code>
		</Example>			


		<!-- Files and endpoints table -->
		<Example Group="ODBC" Label="Dowload a file (my drive)" Desc="Downloads a file (from user my drive)">
			<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>
		
		<!-- Files and endpoints table -->
		<Example Group="ODBC" Label="Dowload a file from google shared drive" Desc="Dowload a file from google shared drive for which user has access">
			<Code>
				<![CDATA[SELECT * FROM download_file
WITH(
	  DriveType='drive' --or set 'user' for mydrive 
	, DriveId='0AFWIggplk2z6Uk9PVA'
	, Id='1hk7odj2Y2--yxN9DY0zW88hSnxqiyHq0' --file id
	, ResponseDataFile='c:\temp\dump.zip'
	--You can get file Id by selecting from 'list_files' endpoint
)				
]]>
			</Code>
		</Example>		
		
		<!-- Files and endpoints table -->
		<Example Group="ODBC" Label="Upload local file to google shared drive folder" Desc="Upload a local file to google shared drive folder for which user has access. Donot set DriveId to upload to MyDrive rather than sahred drive.">
			<Code>
				<![CDATA[SELECT *
FROM upload_file
WITH(
	  DriveId='0AC00HWQH144cUk9PVA' --team drive id (keep blank for uploading to my drive)
	, DiskFilePath='C:\temp\dump.csv' --source file path
	, FileName='dump.csv' --target file name
	, ParentFolderId='1PRySfNNjWIp9ZAnhPh-u9tKRj3QOETSq'
	, KeepRevisionForever='false'	
)				
]]>
			</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="Delete a file by name from a shared drive" Desc="Delete a file by name from a shared drive">
			<Code>
				<![CDATA[DELETE FROM Files where Name='dump.csv' and Trashed=0 WITH(DriveId='0AC00HWQH144cUk9PVA', DriveType='drive')
  --You can get file Id by selecting from 'list_files' endpoint]]>
			</Code>
		</Example>



		<Example Group="ODBC" Label="Upload a file with INSERT keyword" Desc="Upload a file with INSERT keyword. Advantage of INSERT is you can use Bulk option using SOURCE clause. This way you can upload many files">
			<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="List files from trash for a shared drive" Desc="Shows deleted items in Trash">
			<Code>
				<![CDATA[SELECT * FROM Trash
				WITH(
				    DriveType='drive'
				   ,DriveId='1j0HFOP4gsoExxxxxx' 	--get id from select * from SharedDrives			   
				 )				
				]]>
			</Code>
		</Example>		
		<Example Group="ODBC" Label="Empty trash bin" Desc="Empties trash bin">
			<Code>
				<![CDATA[DELETE FROM Trash]]>
			</Code>
		</Example>
		<Example Group="ODBC" Label="Empty trash bin for a shared drive" Desc="Empties trash bin for a specified shared drive">
			<Code>
				<![CDATA[DELETE FROM Trash
				WITH(
				    DriveType='drive'
				   ,DriveId='1j0HFOP4gsoExxxxxx' --get id from select * from SharedDrives
				 )
				]]>
			</Code>
		</Example>		
		<!-- export_file-->
		<Example Group="ODBC" Label="Export Google Sheet to Excel (xlsx) or PDF" Desc="Export a Google files to other format (e.g. Google Sheets to MS Excel / PDF)">
			<Code>
				<![CDATA[SELECT "Status" FROM export_file
				WITH(
                      Id='1j0HFOP4gsoE-Zbf2xN3IsPSj8wgwNtIfyyvM1_BWkW4' --//google sheet id or document ID
					  
				   --,DriveId='xx your shared drive id'  --get id from select * from SharedDrives
				   --,DriveType='drive'
					   
					 , ExportAs='application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
				   --, ExportAs='application/pdf'
					 , ResponseDataFile='c:\temp\sheet1.xlsx'		
					 , FileOverwriteMode='AlwaysOverwrite' -- or try 'FailIfExists' or 'SkipIfExists'					 
				))
			 --You can export files from 'export_file' endpoint]]>
			</Code>
		</Example>
			
	</Examples>
</ApiConfig>