Google Drive actions let an agent work with files and folders directly in a flow. An agent can upload, download, copy, share, list, and delete files, and create folders, then pass the results to later steps.Documentation Index
Fetch the complete documentation index at: https://explore.airia.com/llms.txt
Use this file to discover all available pages before exploring further.
Supported actions
| Group | Actions |
|---|---|
| File | Upload, Download, Copy, Share, List, Delete |
| Folder | Create |
Prerequisites
Create a Google credential
Create a Google credential
Connect a Google OAuth credential in Credential Management, then select it on every Google Drive action. To set up the OAuth client, follow the Google Cloud Console setup guide. These actions also support end user authentication, so a step can act on each user’s own Drive.
How to use these actions
- Map text inputs from earlier steps. Inputs such as File Name, File ID, and Query accept a value mapped from a previous step.
- Selections and toggles take fixed values. The Role, Permission Type, and File Return Mode selections, the Include Trashed and Send Notification Email toggles, and Max Results are entered directly rather than mapped from a previous step.
- File content is base64 encoded. Pass uploaded file content as a base64 encoded string in File Content Base64.
- Leave a parent folder empty for the root. When a parent folder input is empty, the file or folder is placed in the root of the Drive.
- List filters with query syntax. The List action filters with Google Drive query syntax, such as
name contains 'report'.
Actions
File
Google Drive File Upload
Uploads a new file to Drive.| Input | Required | Description |
|---|---|---|
| File Name | Yes | The name of the file to create. |
| File Content Base64 | Yes | The file content as a base64 encoded string. |
| Parent Folder ID | No | The folder to place the file in. Leave empty for the root folder. |
| Content Type | No | The MIME type of the file, such as application/pdf. |
Google Drive File Download
Downloads a file from Drive.| Input | Required | Description |
|---|---|---|
| File ID | Yes | The unique identifier of the file to download. |
| File Return Mode | No | How to return the file, either Content for a base64 string or Url for a download link. Defaults to Content. |
Google Drive File Copy
Copies an existing file.| Input | Required | Description |
|---|---|---|
| File ID | Yes | The unique identifier of the file to copy. |
| New File Name | No | The name for the copy. Defaults to the original name prefixed with “Copy of”. |
| Parent Folder ID | No | The folder to place the copy in. Defaults to the original file’s folder. |
Google Drive File Share
Shares a file with a person or creates a public link.| Input | Required | Description |
|---|---|---|
| File ID | Yes | The unique identifier of the file to share. |
| Email Address | No | The person to share with. Leave empty to create a public link. |
| Role | No | The access level, one of reader, commenter, writer, fileOrganizer, organizer, or owner. Defaults to reader. |
| Permission Type | No | The kind of grantee, one of user, group, domain, or anyone. Defaults to user. |
| Send Notification Email | No | Whether to email the recipient about the share. Toggle, defaults to on. |
| Email Message | No | A custom message to include in the notification. |
Google Drive File List
Lists files in Drive.| Input | Required | Description |
|---|---|---|
| Folder ID | No | The folder to list files from. Leave empty for the root folder. |
| Query | No | A filter in Google Drive query syntax, such as name contains 'report'. |
| Max Results | No | Maximum number of files to return, from 1 to 1000. Defaults to 100. |
| Include Trashed | No | Whether to include trashed files. Toggle, defaults to off. |
Google Drive File Delete
Deletes a file from Drive.| Input | Required | Description |
|---|---|---|
| File ID | Yes | The unique identifier of the file to delete. |
Folder
Google Drive Folder Create
Creates a new folder.| Input | Required | Description |
|---|---|---|
| Folder Name | Yes | The name of the folder to create. |
| Parent Folder ID | No | The folder to place the new folder in. Leave empty for the root folder. |
Example
An agent that files a generated report into Drive and shares it:Create a folder
A Google Drive Folder Create action makes a folder named for the reporting period and returns its ID.
Upload the report
A Google Drive File Upload action sets File Name and File Content Base64 from the generated report, sets Content Type to
application/pdf, and maps Parent Folder ID to the folder from the previous step.Troubleshooting
File or folder not found
File or folder not found
The File ID or Parent Folder ID does not exist or the connected account cannot see it. Confirm the item is owned by or shared with the authenticated user.
Invalid base64 content
Invalid base64 content
File Content Base64 must be a valid base64 encoded string. Encode the file content before mapping it into the action.
Sharing failed
Sharing failed
Authentication failed
Authentication failed
The Google OAuth credential expired or was revoked. Reconnect the credential and confirm the OAuth client grants Drive access.
