npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

node-red-contrib-drive-collection

v1.0.0

Published

Node-RED nodes for Google Drive and OneDrive file operations

Downloads

135

Readme

node-red-contrib-drive-collection

Node-RED nodes for Google Drive and OneDrive file operations.

Supports upload and download. Each provider has its own config node and operation nodes.


Nodes

| Node | Type | Purpose | |---|---|---| | google-drive-config | config | Google Drive OAuth2 credentials | | google-drive-upload | operation | Upload a file to Google Drive | | google-drive-download | operation | Download a file from Google Drive | | onedrive-config | config | OneDrive OAuth2 credentials | | onedrive-upload | operation | Upload a file to OneDrive | | onedrive-download | operation | Download a file from OneDrive |


Google Drive

google-drive-config

Shared credentials for all Google Drive nodes.

| Field | Description | |---|---| | Client ID | OAuth2 client ID from Google Cloud Console | | Client Secret | Stored as a credential | | Refresh Token | Paste manually from OAuth2 Playground or your own auth flow |

The access token is refreshed automatically in memory and is never persisted.


google-drive-upload

Upload a file to Google Drive.

Input:

| Property | Description | |---|---| | msg.payload | Buffer or readable stream (required) | | msg.filename | Overrides node filename. Default: timestamp | | msg.folderId | Google Drive folder ID. Overrides node config | | msg.mimeType | Overrides node MIME type. Default: application/octet-stream |

Output:

| Property | Description | |---|---| | msg.payload | Google Drive file metadata ({ id, name }) | | msg.fileId | ID of the uploaded file |


google-drive-download

Download a file from Google Drive as a readable stream.

Input:

| Property | Description | |---|---| | msg.fileId | Google Drive file ID. Overrides node config |

Output:

| Property | Description | |---|---| | msg.payload | Readable stream of file content |

Output is a stream, not a Buffer. Pipe it to a file writer or another node that consumes streams.


OneDrive

onedrive-config

Shared credentials for all OneDrive nodes.

| Field | Description | |---|---| | Tenant ID | Azure AD tenant ID | | Client ID | App registration client ID | | Client Secret | Stored as a credential | | Refresh Token | Paste manually from your OAuth2 flow |

The access token is refreshed automatically in memory and is never persisted.


onedrive-upload

Upload a file to OneDrive (simple upload, suitable for files up to ~4 MB).

Input:

| Property | Description | |---|---| | msg.payload | Buffer or readable stream (required) | | msg.path | OneDrive path, e.g. Documents/file.txt. Overrides node config |

Output:

| Property | Description | |---|---| | msg.payload | OneDrive file metadata from Graph API | | msg.fileId | ID of the uploaded file |


onedrive-download

Download a file from OneDrive as a readable stream.

Input:

| Property | Description | |---|---| | msg.fileId | OneDrive item ID. Overrides node config |

Output:

| Property | Description | |---|---| | msg.payload | Readable stream of file content |

Output is a stream, not a Buffer.


Node status

| Color | Meaning | |---|---| | Yellow | In progress | | Green | Success | | Red | Error |


OAuth2 Bootstrap

These nodes use OAuth2 with a refresh token. You must obtain the refresh token externally:

  • Google Drive: Use OAuth2 Playground with the Drive API scope (https://www.googleapis.com/auth/drive)
  • OneDrive: Register an app in Azure Portal, then run an auth code flow with the Files.ReadWrite scope

Paste the refresh token directly into the config node. The nodes do not implement a UI for the initial OAuth flow.


Design

  • One node per operation
  • Config node as single source of truth for credentials
  • msg overrides always win over node config
  • Streams over buffering — download nodes return streams, not Buffers
  • Manual OAuth bootstrap — no hidden auth flows
  • No generalized abstraction layer — Google Drive and OneDrive nodes are independent

License

Apache-2.0