🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@robinpath/google-drive

Package Overview
Dependencies
Maintainers
4
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@robinpath/google-drive

Google Drive integration — upload, download, search, copy, move, share, and manage permissions on files and folders. Service-account authentication using a JWT exchange (no user OAuth dance).

latest
npmnpm
Version
0.3.0
Version published
Weekly downloads
17
240%
Maintainers
4
Weekly downloads
 
Created
Source

@robinpath/google-drive

Google Drive module for RobinPath.

Category Functions Auth License

Why use this module?

The google-drive module lets you:

  • List files in Google Drive with optional query filter.
  • Get file metadata by ID.
  • Download file content as text.
  • Upload a file to Google Drive.
  • Create a new folder in Google Drive.

All functions are callable directly from RobinPath scripts with a simple, consistent API.

Installation

robinpath add @robinpath/google-drive

Quick Start

1. Set up credentials

googleDrive.setCredentials "ya29.xxx"

2. List files in Google Drive with optional query filter.

googleDrive.listFiles {"q":"mimeType='application/pdf'","pageSize":10}

Available Functions

FunctionDescription
google-drive.setCredentialsSet the OAuth2 access token for Google Drive API.
google-drive.listFilesList files in Google Drive with optional query filter.
google-drive.getFileGet file metadata by ID.
google-drive.downloadFileDownload file content as text.
google-drive.uploadFileUpload a file to Google Drive.
google-drive.createFolderCreate a new folder in Google Drive.
google-drive.deleteFilePermanently delete a file or folder.
google-drive.moveFileMove a file to a different folder.
google-drive.copyFileCopy a file, optionally with a new name or destination.
google-drive.shareFileShare a file with a user by email.

Examples

List files in Google Drive with optional query filter.

googleDrive.listFiles {"q":"mimeType='application/pdf'","pageSize":10}

Get file metadata by ID.

googleDrive.getFile "file-id"

Download file content as text.

googleDrive.downloadFile "file-id"

Integration with RobinPath

import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/google-drive";

const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);

const result = await rp.executeScript(`
  googleDrive.setCredentials "ya29.xxx"
  googleDrive.listFiles {"q":"mimeType='application/pdf'","pageSize":10}
`);

Full API Reference

See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.

License

MIT

Keywords

googledrive

FAQs

Package last updated on 06 May 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts