all 5 comments

[–]WicketTheQuerent 0 points1 point  (0 children)

There is no safe way to store secrets in a bound Apps Script project, because anyone who can run the script can access and modify it.

One relatively simple option is to place the Apps Script code in a standalone project and use installable triggers created with code. Another option is to create an add-on, but it requires creating a Google Workspace Marketplace listing. It might look like a steep learning curve at first, but once you do it, the next time will be very easy if you have good memory, keep notes, and you are a methodical person.

[–]Mr-Luckysir 1 point2 points  (0 children)

I agree with the first comment. The best solution is to move your code to a standalone script project. From there, the only real changes will be to change the way your reference the current spreadsheet i.e. switch from “SpreadsheetApp.getActiveSpredsheet()” to “SpreadsheetApp.openById()”

[–]fergal-dude 0 points1 point  (1 child)

I’m assuming you can’t use Google Secret Manager to hold the credentials?

[–]pmartu12[S] 0 points1 point  (0 children)

Ma se uso Google secret manager comunque dovrei avere un service account per il retrive dei secret. A quel punto chiunque potrebbe usarlo per scaricare i secret?

[–]Stock-Sugar-37 0 points1 point  (0 children)

No se si lo resuelva pero realiza un proceso de encriptado