I write app-script for Google Sheet and I need co connect to external database to get data for rows filling. I need to share it so I can't show database credentials. How can I do it?
Asked
Active
Viewed 2,141 times
0
-
did you ever find a solution to this problem? I think I have exactly the same requirement, and none of the answers in the link seem to solve the problem. I have all the sensitive information stored in a UserSettings.gs file. I want to share a project but keep that file private. – Chris A Apr 15 '20 at 14:02
1 Answers
3
I'm not sure if i understand your particular problem but a way is to store the credentials into Project Properties / User Properties and use (e.g) installable triggers running as you. This works if the access is through a trigger.
Also you can use a library and put the confidential processes into it, just use the Project Properties / Scirpt Properties and share it as view only. Just design your algorithm to avoid the credentials doesn't pop up into the execution transcript.

jpp
- 194
- 1
- 7
-
As I can see, Project Properties / User Properties is not usefull to store database credentials. Project Properties is visible by all people who can use shared sheet, User Properties can be used only by one user (so other users can't connect to database). I think that using library is right way in fact. – Peter222 Jan 07 '18 at 15:20