@uriva/p2b-google-drive
1.0.6Skill
Description
Google Drive utils using safescript..
Verified
tank install -g @uriva/p2b-google-driveVerified clean
No security issues detected in the latest scan.
Google Drive Skill
Allows bot to interact with Google Drive.
All functions require a token parameter that must be mapped to a bot secret via
secretMapping. The exact secret name varies per bot. To find the correct name:
- Call
secrets_and_variables/list_env_variables - Pick the secret whose hosts include
www.googleapis.comordrive.googleapis.com - Pass that secret name in
secretMapping(e.g.{ "googleToken": "GOOGLE_WORKSPACE_TOKEN" })
Do not guess secret names. Do not pass env var names like GOOGLE_TOKEN as
token values. Always discover the name first.
All functions return { success, result, error }.
Functions
searchDrive(googleToken, query)
Searches Google Drive for files.
query: A search term (e.g.,"Moving") OR a Google Drive API query expression (e.g.,"name contains 'Moving'","name = 'Moving Log' and mimeType = 'application/vnd.google-apps.spreadsheet'"). Plain search terms are automatically wrapped infullText contains '...' and trashed = false.
listFilesByFolder(googleToken, folderId)
Lists non-trashed files inside a Google Drive folder by folder ID (e.g. "root").