I hired a Google Apps Script developer and they delivered unreadable code. What’s going on?

A few days ago I got an update from a Google Apps Script group that I subscribe to. The poster shared a jumble unreadable single-line mess of code with a message that read something similar to:

I hired a Google Apps Script developer and they shared me this. It works, but it is unreadable. What should I do?

Obfuscated Code Google Apps Script
Google Apps Script code that has been intentionally obfuscated. Click to expand!

It looked like the poster’s code has been deliberately obfuscated or obscured to make it difficult for someone to read. The code solves the problem for the client and runs as it should. It’s just near impossible to read or edit without seeing the original source code.

Picket lines were formed in the comments section of the post and salvos ensued. It wasn’t a Reddit-level skirmish, but it was getting there before it ran out of steam.

The post and the ensuing comments did raise some good points of view that are well worth considering as a freelance Google Apps Script developer or as someone who plans to hire a developer.

Continue reading “I hired a Google Apps Script developer and they delivered unreadable code. What’s going on?”

List All Users in an Organisation’s Google Workspace Account with Google Apps Script

Note! This tutorial is for Google Workspace for organisations and not the free consumer account, unfortunately. 

While the Google Apps Script docs provide a great example of how to get a list of users in a Domain on a Google Workspace account, it is not in the scope of the documentation to go into the weeds and explain all the ways we can search for all users.

Weeds sound much more like the purview of a goat. A coding goat, perhaps 🐐. Me. I’m talking about me…yeesh!

In this tutorial, we will cover how to access your Google Workspace organisation’s user data, what data you can retrieve and how it looks, who can retrieve it and a couple of ways to display what you need.

This post is intended as a resource reference that compliments the Google Docs on the Admin SDK. Links to the Google documentation are provided throughout the post. It is worth a bookmark if you intend on using the Admin SDK a lot in Google Apps Script.

Use the contents page to navigate to what you need.

Continue reading “List All Users in an Organisation’s Google Workspace Account with Google Apps Script”

Why can’t I edit this Google Sheet that was shared with me? 🤔

You’ve probably come to this page feeling pretty frustrated that you’ve received a link to a Google Sheet, Google Slide or Google Doc in an email or found a link to one of these documents in a website or even one of my tutorials, but you just can’t edit it. You can’t update the text and even half of the menu bar is greyed out!

Naaarggghhhh!!!!

What’s going on?

It means that you have been given only View permissions to this document.

Why?

Generally, it’s because any changes in a Google Workspace Document, (Sheets, Slides, Docs) will be displayed for anyone who has access to the document. So if you add or delete something in a document, then other editors, commentators and people with view-only access will see the change in near real-time.

https://yagisanatode.com/2020/11/25/google-sheets-beginners-sharing-your-sheet-20/

There are three main reasons why an owner of a document will provide View-only access to users:

1. It might have only been meant for you to read-only.

Maybe you get an email from another department from work with a new policy that they have. You don’t really need to make edits to this. You just need to read it, right?

If you think this might be the case, but you want to be able to access the document in your personal folder, you can go to File > Add a shortcut to Drive. This will save a short cut to the file in your own Google Drive to help you to better organise your documents.

You still won’t be able to edit the document, but you don’t need to.

Also, the owner or the editors of the documents can also make copies of the document after you have made the shortcut if they need to.

2. It might be an example document or template.

In my tutorials, I often provide links to templates or example documents. Here again, I only ever provide view access.

However, you can create your own copy of these documents easily, by going to File > Make a copy. You will then be prompted to move the copy into a desired folder in your Google Drive.  Once done, a new window will appear in your browser. You will then have your very own copy of the document that is owned by you. You can now edit it and it will not affect the original document, because they are two separate documents.

3. The owner may have forgot to make you an editor.

Maybe the owner of the document was meant to give you edit permission but may have forgot.

Now before you get too excited, there is one thing you might want to check to save yourself some embarrassment. Go up to the top of your sheet and check to see if you are using the correct account for this sheet. You can do that in the top-right corner of the document and confirm you are using the right avatar.

Perhaps the owner has given you edit permission to the document in another one of your accounts, like a work account.

If you are in the wrong account, simply change to your correct account and check to see if you have edit permission.

If you are in the correct account and you are certain you should have edit permission, then you can select the View Only button and then click Request view access. An email will be sent to the owner and they can decide if you need edit access.

Why so much build-up to this last option? Well, you can imagine that it can be a little frustrating to get a bunch of emails from people who don’t actually need edit access.

Fortunately, there is a workaround to receiving a bunch of emails requesting edit access unnecessarily. Check out the tutorial below:

https://yagisanatode.com/2019/09/07/how-to-stop-getting-google-document-requests-to-edit-from-users-outside-your-organisation-from-publically-viewable-files/

Check out the video:

 

Did you enjoy the tutorial? Want to upskill and get a solid step-by-step course to become a pro at Google Sheets? Check out my course, Google Sheets: Learn the Essentials with Three Detailed Projects. Sign up today.

 
Google Sheets Shortcuts Mousepad
Google Sheets Shortcuts Mousepad
Want a fast track to boost your Spreadsheet efficiency? Grab one of these handy Google Sheets Shortcuts mousepads that I created from my store.
Google Sheets Shortcuts Mousepad Gel
Google Sheets Shortcuts Mousepad Ge

~Yagi

Automatic download link for non-Google Workspace files in Google Drive

Ever wanted your users to simply click a button on your webpage and,💥, a file you saved on Google Drive is automatically downloaded for them?

Here have a look at two examples:

NOTE! Clicking the links above will automatically download the file described.

This quick tool allows you to do just that. It works with any file like:

  • Images e.g. *.png *.jpg.
  • Documents e.g. *.pdf *.doc.
  • Zip files e.g. *.zip *.7z.
  • Pretty much anything that isn’t a Google Workspace file like a Google Sheet, Google Doc, Google Slide.

Grab and set up the file

    1. Find the file you need to set up for auto-download.
    2. Righ-click the file.
    3. Select Get link.
    4. Ensure the settings says, Anyone with link can view.
    5. Select Copy link.
Google Drive get link example
Click to expand!

Create the link

*Wait for the converter to load.

Do no harm!

Yes, I guess this could be used for downloading some nefarious content. This little tool is designed to provide a convenience for you and the people you want to share your files with. Please consider other people when preparing a tool for them. Even a quick heads up in your own content might be a good idea:

  • Note! File will download automatically from Google Drive.
  • Note! Clicking this file will download it automatically.

What about my Google Workspace Files?

Not directly with this tool, I’m afraid. The simple answer is Google Workspace files are designed to be in Google Drive and online. Much better for you to share the file publically and then provide a link to the file.

However…

If you are intending on providing your Google Workspace files or folders for your users to download and use offline anyway then you could download the in advance. This will cause the Google Workspace files to be exported into an offline format. Then you can drag that converted file and put it back in your drive and share it. You will be able to complete the steps above then.

Also, if you are downloading an entire folder it will export it files into usually Microsoft formats for you automatically and save the entire document in a zip file. Then you can drag that zip file back into your Google Drive and convert with the above too.

Neat huh?

~Yagi