Skip to main content

Search folder in Google Drive

Searches for files in a Google Drive folder matching the search criteria.

This Wrk Action divides. For more information on divides please visit our article explaining Divides.

Common use cases

  • Data Management

Application

  • Google Drive

Inputs (what you have)

TitleDescriptionData TypeRequired?Example
Folder linkLink to the Google Drive folder being searchedURLYeshttps://drive.google.com/drive/folders/1AGivk11BManKUk1PVA?ths=true
Maximum number of resultsPredefined Choice ListYes
File typeThe type of file you want to retrievePredefined Choice ListNoPDF File
File nameThe name of the file you want to retrieveText(Short)Nofile-1
Minimum file size in megabytesThe minimum size of the fileIntegerNo50
Maximum file size in megabytesThe maximum size of the fileIntegerNo200
Owner full nameThe owner of the files nameText(Short)NoJohn Doe

Note: the value of inputs can either be a set value in the configuration of the Wrk Action within the Wrkflow, or a variable from the Data library section. These variables in the Data library section are the outputs of previous Wrk Actions in the Wrkflow.

Outputs (what you get)

NameDescriptionData TypeExample
File nameName of the fileText(short)file-1
File linkLink to the filestringhttps://docs.google.com/spreadsheets/d/123/edit?usp=drivesdk
Created date and timeCreation date and time of the fileDate and time2023-01-13T18:07:39.746Z
Last modified date and timeLast modified date and time of the fileDate and time2023-01-13T18:07:53.920Z
OwnersFull name(s) of the owners of the fileText(short)Jane Doe
File size in bytesSize of the file in bytesInteger1024
Last modifying userFull name of the last user to modify the fileTextJanet Smith
PDF download linkLink to convert and download the file to a PDF if applicable.URLhttps://docs.google.com/spreadsheets/export?id=123&exportFormat=pdf
PPTX download linkLink to convert and download the file to a PPTX if applicable.URLhttps://docs.google.com/feeds/download/presentations/Export?id=123&exportFormat=pptx
CSV download linkLink to convert and download the file to a CSV if applicable.URLhttps://docs.google.com/spreadsheets/export?id=123&exportFormat=csv
Excel download linkLink to convert and download the file to an Excel document if applicable.URLhttps://docs.google.com/spreadsheets/export?id=123&exportFormat=xlsx
Word download linkLink to convert and download the file to a Word document if applicable.URLhttps://docs.google.com/feeds/download/documents/export/Export?id=123&exportFormat=docx
Media typeThe media type of the fileText(short)folder

Outcomes

NameDescription
SuccessThis status is selected if the files were successfully searched for using the provided criteria
No ResultThis status is selected in the event of the following scenarios:No files are found using the provided search criteria
UnsuccessfulThis status is selected in the event of the following scenarios:The external system is not accessibleThe Google Drive link provided is not validThe credentials do not have access to the Google Drive link provided

Requirements

  • The provided file must give editing permissions to googlewrkbots@wrk.com
  • Editing permissions to googlewrkbots@wrk.com should also be given to all source and destination folders
    • If the file is nested in multiple folders editing permission to googlewrkbots@wrk.com should be given to every folder