1
votes

I've got an ambitious first Google Apps Script project for use in a Google site.

Using a spreadsheet database I have a list of Google users that each have a unique URL to a service at a non-Google website.

What I need to do is place a link in a Google Site that will

  • Get current user id based on logged in user
  • Interrogate spreadsheet database for the unique URL based on Google user
  • open the unique url in another tab/window

Any pointers or code snippets would be very much appreciated, especially around minimising user authorisation. As it is a Google Apps domain the script could be pre-authorised as a trusted script if that is even possible.

Thank you

1

1 Answers

0
votes

I did write a site gadget that does exactly what you want, (except that users have to enter their name because the site is public and I wanted to avoid asking authorization), you'll find the code and explanations here, I'm not going to reproduce the whole code here but in short it allows to enter a name (even partially) and looks for any match in a spreadsheet list then shows a link to an individual url. It is also possible to see it working on the same page.

enter image description here (see page bottom, it looks like this)

To answer your second point, there is no way to avoid the authorization process, the idea of 'trusted source in a domain' has already been mentioned in a few discussions with project members but for now it is not possible.