Tuesday, July 13, 2010

Tips for Publishing to the Apps Script Gallery

Every week we're seeing great new scripts being submitted for inclusion in the Apps Script Gallery. We've noticed that there are a few common issues that tend to pop up often. Here are some tips for submitting scripts to help you get your script included in the gallery as quickly as possible.

Provide a complete, accurate description of what your script does and why it's useful.
When you save your script, be sure to include a detailed explanation of the purpose of your script in the Description field. Imagine you are posting a short ad for your script -- what would you say to explain it to another user?

If your script relies heavily on spreadsheet formatting, consider submitting a spreadsheet template instead.
If your script depends upon a spreadsheet being formatted in a particular way or covers a very specific use case, then submitting a spreadsheet template that includes the script could be a better option. The Apps Script team has submitted some examples of spreadsheet templates that contain scripts.

Consider adding a custom menu to the spreadsheet to make it easier to run your script.
Adding a custom menu to the spreadsheet will make it easier for users to run your script, and will save them from having to launch the script editor each time they want to run the script. Not everyone is comfortable with scripts, so consider adding a menu to make it clear what they should do.

Don’t rely on sheet, row, or column indices within a spreadsheet.
Avoid explicitly using sheet, row, or column indices, and instead refer to the active sheet, active selection, or column headers. For example, avoid using getSheets()[0], and instead use getActiveSheet(), since a user may want to have your script act upon a different sheet than the one returned by getSheets()[0].

If you build upon another script from the gallery, please contact the original script’s author to give them the opportunity to add your changes. We’d like to avoid having many versions of the same script in the gallery.

Keep publishing those scripts!

Note: Currently, you can only publish scripts from a Google Account, not from a Google Apps account. If you don’t have a Google Account, you can create one now.

Posted by: Jan Kleinert, Google Developer Relations

1 comment: