Import Google Classroom Data to Google Sheets
In this guide, we’ll walk through how to pull Google Classroom API data data directly into Google Sheets, using the API Connector add-on for Sheets. We’ll be connecting using API Connector’s built-in OAuth2 integration for Google Classroom. This is a paid feature; please install API Connector for a free trial or upgrade to access.
- What Does This Integration Do?
- Before You Begin
- Part 1: Connect to the Google Classroom API
- Part 2: Create your Google Classroom API Request
- Part 3: Pull Google Classroom API Data into Sheets
- Part 4: More Example API Requests
WHAT DOES THIS INTEGRATION DO?
This integration connects the Google Classroom API to Google Sheets. It enables the following scopes:
|…/auth/classroom.announcements||View and manage announcements in Google Classroom|
|…/auth/classroom.course-work.readonly||View instructions for teacher-assigned work in your Google Classroom classes|
|…/auth/classroom.courses.readonly||View your Google Classroom classes|
|…/auth/classroom.coursework.me||See, create and edit coursework items including assignments, questions, and grades|
|…/auth/classroom.coursework.students||Manage course work and grades for students in the Google Classroom classes you teach and view the course work and grades for classes you administer|
|…/auth/classroom.courseworkmaterials||See, edit, and create classwork materials in Google Classroom|
|…/auth/classroom.guardianlinks.me.readonly||View your Google Classroom guardians|
|…/auth/classroom.guardianlinks.students.readonly||View guardians for students in your Google Classroom classes|
|…/auth/classroom.push-notifications||Receive notifications about your Google Classroom data|
|…/auth/classroom.rosters.readonly||View your Google Classroom class rosters|
|…/auth/classroom.student-submissions.me.readonly||View your course work and grades in Google Classroom|
|…/auth/classroom.student-submissions.students.readonly||View course work and grades for students in the Google Classroom classes you teach or administer|
|…/auth/classroom.topics||See, create, and edit topics in Google Classroom|
BEFORE YOU BEGIN
Click here to install the API Connector add-on from the Google Marketplace.
PART 1: CONNECT TO THE GOOGLE CLASSROOM API
- Open up Google Sheets and click Add-ons > API Connector > Manage Connections.
- In the list of available connections, find “Google Classroom” and click Connect.
- You will be directed to google.com and asked to allow API Connector to access your classroom information. Choose the scopes you’d like access to and click Allow.
- You’ll then be returned to your Google Sheet, and can verify that your Google Clasroom connection is active in the Connections screen.
PART 2: CREATE YOUR GOOGLE CLASSROOM API REQUEST URL
We’ll first pull in a list of the courses you have access to.
- API root: https://www.googleapis.com
- Endpoint: /v1/courses
Putting it together, we get the full API Request URL:
PART 3: PULL GOOGLE CLASSROOM API DATA INTO SHEETS
We can now enter our values into API Connector and start importing Google Classroom data into Google Sheets.
- In API Connector, click Create, choose GET from the dropdown menu, and paste in the Request URL we created above.
- We don’t need any headers so just leave that section blank.
- Choose ‘Google Classroom’ from the authentication dropdown.
- Create a new tab and click ‘Set current’ to use that tab as your data destination.
- Name your request and click Run. A moment later you’ll see a list of your courses populate your sheet.
PART 4: MORE EXAMPLE API REQUESTS
For the full set of endpoints check the API documentation here: https://developers.google.com/classroom/reference/rest
If you want to get an idea how it works, you can also check these examples:
- List course announcements (get your courseId value from the previous request):
- List class coursework