I had published a private addon on google spreadsheet. However, the problem is, I lost the app script source code for my addon. I need to make some changes and publish it again.
How can I possibly get/download the code from the spreadsheet addon that I published on the chrome web-store?
I tried looking on https://chrome.google.com/webstore/developer/dashboard where there is a list of all my addons published but there's no option for reading the source code. A quick google search reveals nothing regarding this. Any suggestions?
I figured out a way to find the code.
From your developer dashboard: https://chrome.google.com/webstore/developer/dashboard
click on more info and then click to download the main.crx file for the addon you're interested in.
main.crx is a zip file which you should be able to unzip. On linux or mac you can do it from the command line unzip yourfilename_main.crx
open up manifest.json and look for "container_id" the string after that is the file ID of your script.
https://script.google.com/d/container_id_of_your_script_here/edit
It's not possible to get the source code from the Chrome Web Store. Instead you have to find the file that holds your Google Apps Script project. Take a look to the Trash of your Google Drive. For further details see Find or recover a file - Google Drive Help
Related
I wrote an extension for Google Docs that used to show up in the Add Ons menu for my organization. The add on no longer shows up in the menu, but I can see it in the Google Workspace Market. I originally had it on the Google Chrome Webstore, but then it moved to the Workspace Marketplace. I can also see the corresponding project in my Google Cloud Platform console.
However, when I go to the Google Apps Script Editor, my project is not there. I have no access to the source code or ability to fix it so that it will show up in the Add Ons menu again. Does anyone know where I might be able to find script? I have the URLs for the Workspace Market, but it is private to my organization, so no one will be able to view it.
Also, I tried going through Google Support but they said that App Scripts is not supported and to ask on Stack Overflow.
Edit:
Screenshot of error
Answer to rev 1
Open the Google Marketplace SD settings page on the Google Cloud project linked of your add-on. There you should find the script project id.
Then on your web browser open your Google Apps Script project by writing a URL like this:
https://script.google.com/d/<<put-here-the-script-project-id>>/edit
If the above doesn't work, see notes at the bottom
Resources
Publish an add-on
Enable and configure the Google Workspace Marketplace SDK
Related
How can I view the source of a google apps script Library
Library with identifier underscoreGS is missing
NOTES
If you get the message "Sorry, unable to open the file at this time", try again using Chrome on incognito mode with all the extensions disabled and signing in only with an account that has access to the Google Apps Script project.
If the above doesn't work either, follow the screen advice, wait a bit and try later.
Related
Google Drive Page Not Found - Sorry, unable to open the file at this time
In my Google spreadsheet, when I go to "Tools->Script Editor..", I get a page saying "No Such User" Error. Any idea how to fix this?
I figure this could be a permissions issue, but not sure how to change permissions if required.
Finally i found the solution accidentally.
The issue is resolved by enabling GoogleAppsScript as part of your drive.
Open Google Drive in your web browser.
Click New > More > + Connect more Apps
and then select GoogleAppsScript.
Once i did this going back to script editor of my spreadsheet, no more gives any error.
Here is the link which contained this step:-
https://developers.google.com/drive/v2/web/quickstart/apps-script
Also there is additional problem about Invalid OAuth Client when trying to run the script. which i faced since each apps script has to be attached to a Google Cloud Project. This is accessible only to the person who originally created the file even after its in the team drive. In which case, you need to make a copy of the apps script available by going into File->Make a copy. And then in the Resources drop down , you will see Cloud Platform Project, upon clicking it you can now give the project number of the Google Cloud Platform project you created on console.cloud.google.com.
I'm trying to publish a Spreadsheet Add-on following the the app scripts documentation but I get this error:
Please fix the following errors:
API Console project with the id specified in the manifest's api_console_project_id field, does not have Google Apps Marketplace
SDK enabled. api_console_project_id
Here you can see a screenshot: http://i.stack.imgur.com/s3w3h.png
Inside the documentation it says:
Do not upload a file in the Upload section at the top of the page;
Apps Script generates this file automatically for you and uploading a
separate file will cause the publication to fail.
As far as I know, the api_console_project_id is inside the manifest.json but it says that I should not upload anything, right? (developers.google.com/apps-marketplace/listing#the_manifest_file)
Does anyone know what do I have to do or why I can not publish?
Thanks!
Sorry I didn't saw your comment till now Mogsdad!
Here is the solution
I have found the answer to my problem (I swear I was looking for an answer during the whole day). Anyway, what I had to do was described in Publishing Add-ons for Domain-Wide Installation.
This question gave the the clue:
Error while publishing to chrome web store
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
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.