I work for a university which uses Google App for EDU. Recently, I decided to begin testing app script to see how it could be of use to our organization. I have been able to create new app scripts and run them without issue. However, I have found that once I close the browser editor tab, I am not able to retrieve any script I've wrote unless I have the editor url saved (ie. I dont see any of my script in my google drive). Is there a particular app script site where my scripts are listed?
Thanks,
Bryan
The long method i use to get to see all my App Scripts is:
open an existing spreadsheet, or simply create a new spreadsheet
go to Extensions > Apps Script
click on the "Apps Script" logo in the top left corner
This will take you to: https://script.google.com/home
The short method is just to have that link (above) saved on browser toolbar and click it whenever i need to.
to be able to starts new script from the drive you have to connect script app to your drive using the Browser interface like below :
from the connect more apps at the bottom search for "script" and add it.
If you created scripts from inside a spreadsheet, they are tied to that sheet and will not show up in Drive; you can find them via the "Script Manager" menu in that spreadsheet.
All standalone scripts will be visible in your Google Drive. Did you write your script inside a spreadsheet or a Google Site ? If so, you have to open the spreadsheet or site to see your script.
If you indeed have a standalone script, make sure you click the 'All Items' on the left hand side of Google Drive or use search.
If you've created a new script from script.google.com and have saved it, it'll appear in Drive under the root My Drive folder.
If you created one from inside of Drive by clicking the red Create button then Script, it'll be in the folder which you last clicked on before clicking Create. If you don't remember what folder you created the script file under, click the Recent folder name to find it.
If you've started one inside a Form , Sheet, or Doc you'll have to remember where the Form, Sheet or Doc was located in Drive.
You can search all your scripts in Google Drive using app:"Google Apps Script" or by selecting Google Apps Script under Opens With from the drop down menu.
As pointed out by #Mandy, this assumes you have added Apps Script as a connect app. See answer from #Serge on how to do that.
Try the handy dashboard/central location for scripts:
https://script.google.com
Related
I have some scripts which make copies of files and folders in Google Drive so users won't have to do this manually, but at the moment these scripts are just script files sitting in the drive and users need to open and run the script. I don't want the users to have to click Run > Run Function, and see the code, etc, so I'm looking for a better way to deploy these.
Ideally, the scripts would appear in a dropdown menu when the users went to their Drive. Is there a way to do this?
I'm considering just creating a Doc. Then users will have to open the doc whenever they want to run one of the scripts, but at least they won't see all the guts. I'm new to Apps script, so I might be overlooking an obvious, better solution...
Google Apps Script doesn't have a way to add UI elements to Google Drive web UI.
I think that this could be achieved by creating a Chrome Extension but I didn't tried this yet.
Reference
https://developers.google.com/apps-script/guides/menus
https://developers.google.com/apps-script/guides/dialogs
I'm wondering if there is a way to share a link to a Google Apps Script file that forces users to make a copy of it? Using Google Docs, you can append /copy to the url. For example:
https://docs.google.com/document/d/19yoQ71RcqNsYgPmZHzw96G_QH05hC20sWxk_ktahpXY/copy
This will force users to make a copy of the original document. I've been trying to do something similiar with a Google Apps Script file.
I've tried appending copy to the URL like this but it doesn't seem to work. As a potential work around, I could just use embedded scripts and share the Sheet/Doc/Form.
Anyone know of a URL parameter to force copying of a Google Apps Script file?
You can use this format to quickly make a copy of any public Google Script.
https://script.google.com/d/SCRIPT_ID/edit?newcopy=true
See example.
There is no way to do this since the new editor has been rolled, have reported it on this issue:
https://issuetracker.google.com/issues/198266388
You can manually make a copy on the new editor by going to the "Overview" tab, and on the top-right is the button to make a copy.
I have created a Google apps script "to download attachments from GMail" from a tutorial. I executed that script for one time.
Then I logged out of Google. Now when I logged in again, I saw the desired script titled "gmailAttachment2drive" in my Google drive. But I want to edit it again to make some changes to it. But I am unable to do it. I cannot even see the source code of that script.
Here are the different things I tried and the responses I got:
If I click on it, I see some "connect app" pop-up type of page, which just shows a bunch of other scripts developed by other people.
If I right clicked it, I don't see any option to edit the script. I tried all options there but could not edit the script.
When I opened "https://script.google.com/" it doesn't show that script. When I clicked "Open" on the File menu, it showed "No saved projects to open"
So, how do I open an existing script that is there in my Drive?
I searched a lot on Google the following "Google apps script how to edit an existing script" but could not get any help to resolve the issue.
Click the "Create" button. (The button used to create new documents)
Located at the bottom of the menu you will see a "Connect more apps" link, click it.
Add the Google Apps Script editor to your Google Drive
Open the script
I've been following the guide found here: https://developers.google.com/apps-script/articles/twitter_tutorial
About creating a twitter app.
I've been looking at the part below:
To get started, copy this spreadsheet containing the script for this tutorial. Once you've got your own copy of the spreadsheet, open it and you will notice the spreadsheet will be empty; that is intentional, as we won't be using any of the spreadsheet's cells in this tutorial.The first thing you need to do is publish your script as a service. To do this, open the script editor by clicking Tools > Script Editor... In the new window, click Publish > Publish as Service...
This doesn't actually work at all.
If I open the spreadsheet and click Tools > Script Editor.. I'm taken to the script wizard. It then give me the option of creating a new script. The script can only be published to gallery, or as a web app. Where is the publish as service option?
Thanks
I checked on the tutorial page and it seems indeed that the template spreadsheet has not script included...
But the full code is still published at the end of the same page so you could copy/paste the full code in the script editor (choose new code from the wizard and delete everything in there ) and start from there.
About the "publish as service" this is the old name of what is now known as deploy as webapp, the procedure is slightly different and is described here, you will need to first save a version (manage version in the file menu) and you will get 2 urls, one for development and one for use, both will run from your browser starting with the doGet() function.
The remaining part of the tutorial about initialisation and authorization from the spreadsheet menu is unchanged, just follow the tutorial instructions.
Hoping it will help you,
The following script was recommended to use a List Page to show a Google Docs folder on a page in a google site.
https://developers.google.com/apps-script/articles/embedding_docslist_in_sites#section2
When I try to run it on a recently created folder in Google Drive, the script never seems to finish.
The script still works for a folder created before the switch to google drive, which has a much longer ID.
What am I missing?
Cheers
In the script gallery (open a spreadsheet, click on menu Tools>Script Gallery), search for "Embed Google Docs Folders in a Google Site".
This is an updated version of the script available in the Apps Script documentation. It should work better.