Skip to content
Kim Nilsson edited this page Jul 16, 2019 · 16 revisions

CB_Inventory

A Google Apps Script using Google Sheets to manage Chrome devices in a G Suite domain.

Replacement of Chromebookinventory? A contender, perhaps, but it doesn't have all the bells and whistles of CI. :-)

As some of you may have noticed, Chromebookinventory disappeared during summer. The announcement says it was because of a code change. UIapp was replaced with HTMLservice, and nobody wanted to update the CI code.

So after my most recent coding attempt, I kept fiddling with Google Apps Script and put together a Sheet that can manage your Chromebooks. It grabs a lot of relevant data into a sheet and displays it in various ways.

Then I also added a way to update devices of your choice.

I definitely recommend you read the contents of the scripts (three) before running any functions. If for nothing else at least so you know it looks like it'll only do what I say. Click Tools /Script editor in the Sheets menu to open it to read.

The scripts can't do anything at all until you authorise them.

I've run the export from a domain with 23 500 devices, without getting a time-out. It did take a while, but it kept going till it was done.

Now, this is not as fancy as GAT+, Gopher for Chrome, BetterCloud or Fleet or other such professional tools, but it has two advantages. It's free, and, for a lot of people, easier than doing the management with GAM.

GAM/GAMADV-XTD3 can, of course, do all this, but it requires a steady hand.

This little thing works great with copy/paste, and a simple menu with three options, export, update and most recently I added a feature to find where most recent user belongs. That data can be used to move devices there, if you want.

Link to copyable CB_Inventory.

https://docs.google.com/spreadsheets/d/13LY-vPYSpr-hSTy7fIzg9Y7nASiGbNzqegaaVaaYd3s/copy

Click the link with your Chromebook admin (often superadmin) account.

Remove Copy of and - Template from name of spreadsheet.

Try to run CB Inventory / 1. Export CBs. It should ask for authorisation.

Allow access to your superadmin/CB Admin account. Else nothing will work.

The script will run and try to download all your CBs' data to the sheet called Devices.

If you wish to update any devices' data, copy necessary data to the sheet UpdateCBs.

All headers have small comments on what you can do and shouldn't.

If you don't want to create a Sheet copy, the two scripts are also available here in this repo.

DO NOTE! If you copy the scripts from here, instead of copying the entire Sheets file, you will have to enable the API manually. Here's how you do that. Click the following menus.

Tools / Script Editor Resources Advanced Google Services

Then click the button for

Admin Directory API

Ok and save.

PRIVACY POLICY

You are in full control of all the data. The script is only accessing data you yourself have access to. No data is sent anywhere, except between you and Google. No matter if you create a copy of my Sheet or my scripts, I will never gain access to any of your data. All data reading and writing is done by you on your own account.

Clone this wiki locally