Lodol Docs

Google Drive

API actions for the Google Drive integration.

Google Drive

Upload, move, and manage files in Google Drive.


Create folder

Create a folder in Google Drive and return a link to it.

Parameters

ParameterTypeRequiredDescription
folder_namestringYesThe name of the folder to create.
parent_folder_urlstringNoThe Google Drive URL of the folder to create the new folder in.

Response

"https://drive.google.com/drive/folders/newfolder123"

Delete file

Delete a file from Google Drive.

Parameters

ParameterTypeRequiredDescription
file_urlstringYesThe Google Drive URL of the file to delete.

Response

true

Download file from URL

Download a Google Drive file given its sharing URL.

Parameters

ParameterTypeRequiredDescription
file_urlstringYesThe sharing URL of the Google Drive file.
download_dirstringNoThe folder to save the downloaded file in.

Response

{
  "content_type": "application/pdf",
  "filename": "downloaded_file.txt",
  "size_bytes": 1024
}

Duplicate file

Duplicate a file in Google Drive and return a link to the copy.

Parameters

ParameterTypeRequiredDescription
file_urlstringYesThe Google Drive URL of the file to duplicate.
destination_folder_urlstringNoThe Google Drive URL of the folder to place the copy in.
new_namestringNoThe name for the copy.

Response

"https://drive.google.com/file/d/xyz789/view"

Move file

Move a file to a different folder in Google Drive.

Parameters

ParameterTypeRequiredDescription
file_urlstringYesThe Google Drive URL of the file to move.
destination_folder_urlstringYesThe Google Drive URL of the folder to move the file to.

Response

"https://drive.google.com/file/d/abc123/view"

Upload file

Upload a file to Google Drive and return a link to it.

Parameters

ParameterTypeRequiredDescription
file_pathstringYesThe file to upload, chosen with the file picker.
folder_urlstringNoThe Google Drive folder URL to upload the file to.
mime_typestringNoThe file's format, for example 'application/pdf'.

Response

"https://drive.google.com/file/d/abc123/view"

On this page