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

n8n-nodes-yuppie-google-drive

v2.6.0

Published

n8n community node for Google Drive operations - upload, download, list, create folder, and search

Readme

n8n-nodes-yuppie-google-drive

这是一个 N8N 社区节点,允许你上传文件到 Google Drive 指定文件夹。

n8n 是一个工作流自动化平台。

功能特性

  • 上传文件到 Google Drive 指定文件夹
  • 支持 OAuth2 和 Service Account 两种认证方式
  • 支持自定义文件名
  • 支持简化输出或完整 API 响应
  • 自动处理二进制文件数据

安装

社区节点安装(推荐)

  1. 在 n8n 中进入 设置 > 社区节点
  2. 选择 安装社区节点
  3. 输入 n8n-nodes-yuppie-google-drive
  4. 点击 安装

手动安装

npm install n8n-nodes-yuppie-google-drive

使用方法

1. 配置凭证

节点支持两种 Google Drive API 认证方式:

OAuth2(推荐)

  • 在 n8n 中创建新的 Google Drive OAuth2 API 凭证
  • 按照 Google OAuth2 流程授权

Service Account

  • 在 n8n 中创建新的 Google API 凭证
  • 上传 Service Account JSON 密钥文件
  • 确保服务账户有访问目标 Drive 的权限

2. 配置节点参数

| 参数 | 说明 | 必填 | |------|------|------| | Authentication | 认证方式(OAuth2 或 Service Account) | 是 | | Input Data Field Name | 包含二进制文件数据的输入字段名称 | 是 | | File Name | 上传后的文件名(留空使用原始文件名) | 否 | | Folder ID | 目标文件夹 ID(使用 "root" 表示根目录) | 是 | | Simplify Output | 是否返回简化的响应 | 否 |

3. 获取文件夹 ID

有以下几种方式获取 Google Drive 文件夹 ID:

  1. 从 URL 获取:打开文件夹,URL 中 https://drive.google.com/drive/folders/{FOLDER_ID} 的部分
  2. 使用 n8n 的 Google Drive 节点:列出文件夹获取 ID
  3. 使用 "root":直接上传到根目录

4. 输入数据格式

节点期望从上一个节点接收包含二进制数据的数据项。例如:

{
  "json": {},
  "binary": {
    "data": {
      "data": "base64_encoded_content",
      "mimeType": "image/png",
      "fileName": "screenshot.png"
    }
  }
}

5. 输出数据格式

简化输出示例:

{
  "id": "1a2b3c4d5e6f7g8h9i",
  "name": "MyFile.pdf",
  "webViewLink": "https://drive.google.com/file/d/...",
  "webContentLink": "https://drive.google.com/uc?id=..."
}

完整输出包含 Google Drive API 返回的所有字段。

示例工作流

从 HTTP 下载并上传到 Google Drive

  1. HTTP Request 节点:下载文件

    • 设置响应格式为 File
  2. Yuppie Google Drive Upload 节点:上传文件

    • Input Data Field Name: data
    • File Name: downloaded-file.pdf(可选)
    • Folder ID: your-folder-idroot

开发

# 安装依赖
npm install

# 验证节点配置
npm run validate

# 构建
npm run build

# 开发模式(监听文件变化)
npm run dev

# 格式化代码
npm run format

# 检查代码
npm run lint

测试

详细的测试指南请查看 TESTING.md

快速测试步骤

  1. 验证节点配置

    npm run validate
  2. 构建节点

    npm run build
  3. 在 n8n 中测试

    • 方式一:本地开发模式
      npm link
      cd /path/to/n8n
      npm link n8n-nodes-yuppie-google-drive
      pnpm start
    • 方式二:导入示例工作流
      • workflow-example.json 导入到 n8n
      • 配置 Google Drive 凭证
      • 运行工作流

技术架构

  • 基于 n8n-workflow 构建
  • 使用 Google Drive API v3
  • 支持 multipart 文件上传
  • TypeScript 实现

许可证

MIT

参考资源