Help Centre › Functions & Formulas
This article describes the RPA Google Drive functionality to check if a file exists.
For a full list of available functions, please read Google Drive functions.
Description
The Google Drive File exists function checks if a file exists by exact name, optionally within a specific folder. Returns true or false.
Setting it up
To use the Google Drive File exists function, follow these instructions:
{{popups:rpas/add:action=google-workspace-drive-file-exists}}
Once on a process map:
- Navigate to the process where you would like to add the Google Drive File exists function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the Google Drive File exists option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| File name | Yes | Text | - | Exact file name to search for |
| Folder ID | No | Text | Entire Drive | Folder ID to search in |
| Variable | No | Text | - | State variable to store the result (true/false) |
Output variables
| Variable | Type | Description |
|---|---|---|
| Variable | Boolean | True if the file exists, false otherwise |
Errors
| Error | Description |
|---|---|
| Folder not found | The specified folder ID does not exist |
Tips
- The search is case-sensitive and matches the exact file name
- Without a folder ID, the entire Drive is searched