# Google Drive

> Upload, download, and manage files in Google Drive via the Drive API using curl.

- Skill: `thinkfleetai/google-drive` (Agent Skill)
- Install (CLI): `npx skillmds@latest add thinkfleetai/google-drive`
- Raw SKILL.md: https://api.skillmd.com/api/skills/thinkfleetai/google-drive/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: thinkfleetai (https://skillmd.com/u/thinkfleetai)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/thinkfleetai/google-drive

---


# Google Drive

File operations via Google Drive API v3.

## Environment Variables

- `GOOGLE_ACCESS_TOKEN` - OAuth2 access token with `drive` scope

## List files

```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
  "https://www.googleapis.com/drive/v3/files?pageSize=10&fields=files(id,name,mimeType,modifiedTime)" \
  | jq '.files[]'
```

## Download a file

```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
  "https://www.googleapis.com/drive/v3/files/FILE_ID?alt=media" -o /tmp/downloaded-file
```

## Upload a file

```bash
curl -s -X POST \
  -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
  -F "metadata={\"name\":\"myfile.txt\"};type=application/json;charset=UTF-8" \
  -F "file=@/tmp/myfile.txt" \
  "https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart" \
  | jq '{id, name}'
```

## Search files

```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
  "https://www.googleapis.com/drive/v3/files?q=name%20contains%20'report'&fields=files(id,name)" \
  | jq '.files[]'
```

## Notes

- For large files (>5MB), use resumable upload.
- Always confirm before deleting files.

