0

I want to use 1 google apps script from multiple Google Spreadsheet files within my Google Drive.

I followed this answer: "you could use Libraries. The idea is that you create one script that you use as a library"

I deployed a library and tried to access it from the Google Apps Script editor. Indeed I can find the library when I enter the library ID (i.e. script ID from script settings), but it gives me a manifest error:

Die Manifestdatei "appsscript.json" enthält Fehler: Ungültige Dienst-ID: 20012023_sistrix_urlkeyword_standalone

Translated:

The appsscript.json manifest file contains errors: Invalid service ID: 20012023_sistrix_urlkeyword_standalone

The manifest file looks like this:

{
  "timeZone": "Europe/Berlin",
  "dependencies": {},
  "exceptionLogging": "STACKDRIVER",
  "runtimeVersion": "V8"
}

I was not able to find any hint on how to enter a valid service ID into the manifest file.

Rubén
  • 34,714
  • 9
  • 70
  • 166
s.Panse
  • 37
  • 9
  • Have you tested the same code in a different Apps Script doc? – Fernando Lara Jan 30 '23 at 14:09
  • Hi @FernandoLara, thanks for your comment. Yes, indeed. I tried to publish the library from a existing project. Means: I started from the script editor of the project I wanted to publish. Then I tried to publish a stand-alone-project. Same problem. The stand-alone came with the same manifest: `{ "timeZone": "Europe/Berlin", "dependencies": {}, "exceptionLogging": "STACKDRIVER", "runtimeVersion": "V8" }` – s.Panse Jan 30 '23 at 15:23
  • 1
    Could you provide a minimal reproducible example of the library that you are publishing? – Fernando Lara Jan 30 '23 at 17:03
  • 1
    Hi @FernandoLara, thanks again! I wanted to reproduce the problem with a basic script - in order to have that reproducable example. But I was able to connect it as a library. As far as I can tell, the identifier (script-name) may have been the problem. I changed it from "30012023_sistrix_keywordabfrage" to "sisirix abfrage" and taht worked. Was it okay if I asked you a new question on this matter? – s.Panse Jan 30 '23 at 19:08
  • Sure thing! If it is related it would be ok, otherwise the community moderators could ask you to create a new post. I just posted your solution from the comments as a community wiki just for future references in case someone else has the same issue later on. – Fernando Lara Jan 30 '23 at 19:27
  • thanks @FernandoLara! I openec a new question: https://stackoverflow.com/q/75289630/10595326 – s.Panse Jan 30 '23 at 21:06

1 Answers1

1

I'm writing this answer as a community wiki, since the issue was resolved from the comments section, in order to provide a proper response to the question.

According to s.Panse, the solution was to change the identifier of the script. It was changed from 30012023_sistrix_keywordabfrage to sisirix abfrage and after that it started to work correctly.

Fernando Lara
  • 2,263
  • 2
  • 4
  • 14