A simple Google Apps Script tool that downloads student assignments from Google Classroom, organizes them by topic and student, and renames files according to a consistent format.
- Topic-based organization: Download assignments from specific topics or all topics
- Student folders: Creates one folder per student within each topic
- Consistent naming: Files are renamed to
assignment-title_student-name.extension - PDF conversion: Option to automatically convert compatible files (Google Docs, Sheets, Slides, and Microsoft Office files) to PDF format
Note: PDF conversion only works for Google Workspace files and Microsoft Office formats. Other file types (images, audio, etc.) will remain in their original format.
- Go to Google Apps Script and create a new project
- Copy the code from
code.gsin this repository and paste it into your project - Click on "Services" (+ icon) and add these Google services:
- Google Classroom API
- Google Drive API
- Save the project (Ctrl+S or ⌘+S)
- Deploy as a web app:
- Click "Deploy" > "New deployment"
- Select "Web app" as the deployment type
- Set "Execute as" to "User accessing the web app"
- Set "Who has access" to "Anyone in your organization"
- Click "Deploy"
- Authorize the app when prompted
- Copy the provided URL to access your app
When you first run the app, it will request the following permissions:
- Google Classroom: To access courses, topics, assignments, and student submissions
- Google Drive: To create folders and save downloaded files
These permissions are necessary for the app to function. The app runs under your account, so it only has access to the courses where you are a teacher or owner.
This script uses the following Google APIs:
- Google Classroom API: For accessing classroom data
- Google Drive API: For file operations
These are automatically enabled when you add the services in the Apps Script editor.
- Open the web app URL
- Select a course from the dropdown
- Choose which topics to download (or select all)
- Optional: Check "Convert compatible files to PDF" to convert documents to PDF format
- Click "Download Selected Assignments"
- A Google Drive folder will be created with the downloaded files
- Click the provided link to open the folder
The app creates the following folder structure in your Google Drive:
Classroom Downloads - [Course Name]/
├── Topic 1/
│ ├── Student A/
│ │ └── assignment-name_student-a.ext
│ └── Student B/
│ └── assignment-name_student-b.ext
├── Topic 2/
│ └── ...
└── Uncategorized/
└── ...

