If you enjoy my Google Workspace Apps Script work, please consider buying me a cup of coffee!
TSDynamicUrls is an Apps Script powered dynamic URL generator for Google Docs, Sheets, Slides, Drawings & Forms which assists document creators and consumers in leveraging the URL power of Google documents. π₯
See the following blog posts for more information and getting started guides:
TSDynamicUrls is intended for use within a G Suite for Business or G Suite for Education domain.
TSDynamicUrls supports the Google document files types/formats and Google Sheets PDF options outlined in the tables below.
TSDynamicUrls Supported Google Document File Types & Formats - *
See below for more on sharing Google Forms.
FORMAT | DOCS | SHEETS | SLIDES | DRAWINGS | FORMS |
---|---|---|---|---|---|
Preview | βοΈ | βοΈ | βοΈ | βοΈ | βοΈ |
Copy | βοΈ | βοΈ | βοΈ | βοΈ | βοΈ * |
Copy w/ Comments | βοΈ | βοΈ | βοΈ | βοΈ | β |
Template | βοΈ | βοΈ | βοΈ | βοΈ | βοΈ * |
MobileBasic | βοΈ | β | β | β | β |
PDF (Portable Document Format) | βοΈ | βοΈ | βοΈ | βοΈ | β |
JPEG (Joint Photographic Experts Group Image) | β | β | β | βοΈ | β |
PNG (Portable Graphics Format Image) | β | β | β | βοΈ | β |
PNG (Portable Graphics Format Image) - Individual Slide Only | β | β | βοΈ | β | β |
SVG (Scalable Vector Graphics Image) | β | β | β | βοΈ | β |
RTF (Rich Text Format) | βοΈ | β | β | β | β |
TXT (Plain Text) | βοΈ | β | βοΈ | β | β |
HTML (Web Page, Zipped) | βοΈ | βοΈ | β | β | β |
DOCX (Microsoft Word) | βοΈ | β | β | β | β |
ODT (OpenDocument Document) | βοΈ | β | β | β | β |
EPUB (EPUB Publication) | βοΈ | β | β | β | β |
XLSX (Microsoft Excel) | β | βοΈ | β | β | β |
ODS (OpenDocument Spreadsheet) | β | βοΈ | β | β | β |
CSV (Comma-separated values) - Individual Sheet Only | β | βοΈ | β | β | β |
TSV (Tab-separated values) - Individual Sheet Only | β | βοΈ | β | β | β |
PPTX (Microsoft PowerPoint) | β | β | βοΈ | β | β |
ODP (OpenDocument Presentation) | β | β | βοΈ | β | β |
TSDynamicUrls Supported Google Sheets PDF Options
GOOGLE SHEETS PDF OPTIONS | |
---|---|
Size (Letter, Tabloid, Legal, Statement, Executive, Folio, A3, A4, A5, B4, B5) | βοΈ |
Orientation (Portrait, Landscape) | βοΈ |
Scale (Normal 100%, Fit to Width, Fit to Height, Fit to Page) | βοΈ |
Page Order (Down, then over; Over, then down) | βοΈ |
Horizontal Alignment (Left, Center, Right) | βοΈ |
Vertical Alignment (Top, Middle, Bottom) | βοΈ |
Repeat Frozen Rows | βοΈ |
Repeat Frozen Columns | βοΈ |
Show Gridlines | βοΈ |
Show Spreadsheet Title | βοΈ |
Show Sheet Names | βοΈ |
Show Page Numbers | βοΈ |
Show Notes | βοΈ |
Custom Margins (Top, Bottom, Left, Right) | βοΈ |
All Sheets / Single Sheet | βοΈ |
Named Range (Single Sheet) | βοΈ |
Custom Range (Single Sheet) | βοΈ |
See this guide for more on sharing Google Forms. Script below.
function share() {
var formId = "<FORM FILE ID>";
var file = DriveApp.getFileById(formId);
file.setSharing(
DriveApp.Access.ANYONE_WITH_LINK,
DriveApp.Permission.VIEW
);
}
Change DriveApp.Access
to desired access level.
ACCESS LEVEL | DESCRIPTION |
---|---|
ANYONE | Anyone on the Internet can find and access. No sign-in required. |
ANYONE_WITH_LINK | Anyone who has the link can access it. No sign-in required. |
DOMAIN | People in your G Suite domain can find and access it. Sign-in required. |
DOMAIN_WITH_LINK | People in your G Suite domain who have the link can access it. Sign-in required. |
PRIVATE | Only people explicitly granted permission can access. Sign-in required. |
How do I ask general questions about TSDynamicUrls?
For general questions, submit an issue through the issue tracker.How do I submit bug reports for TSDynamicUrls
For bug reports, fork this repository, create a test which demonstrates the problem following the procedures outlined in the "Tests" section below and submit a pull request. If possible, please submit a solution along with the pull request.TSDynamicUrls for Google Forms unit tests can be found in form/tests folder.
To perform TSDynamicUrls for Google Forms unit tests:
-
Add the appropriate test file from the form/tests folder to the TSDynamicUrls form script editor. IMPORTANT: Each test is configured as a web app so only install one test at a time to avoid conflicts.
-
Install QUnit for Google Apps Script by adding the project library (see the project documentation for proper install instructions).
-
Deploy the script as a web app (execute script as self).
-
Set the desired unit test configuration entry in the
testConfig
object totrue
(see each file for information on where to modify these values to enable tests). NOTE: Some tests can take longer to run so best to run them individually. -
Access the deployed web app for test results.
- 2021-03-19 - Added /mobilebasic option for Google Docs. To test:
- Make a copy of this Google Form.
- Add a MobileBasic option to the Google Docs URL Modification Type? section.
- Replace the Code.gs in the copied form.
TSDynamicUrls License
Β© Laura Taylor (github.com/techstreams). Licensed under an MIT license.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.