2

For a Google site, I want a page to display content based on the url parameters.

Eg. http://sites.google.com/../mypage?id=123

Then I want to make a HTTP request using the id and display the result on the page.

Or I want to use App Scripts to perform something and display the result on the page.

How can I do so?

twb
  • 1,248
  • 4
  • 18
  • 31

2 Answers2

3

Use on Google app script

function doGet(e){
// id in your Url. example :   http://sites.google.com/../mypage?myidok=123
var element - e.parameters.myidok

// code 
// your app 

}
Hann
  • 727
  • 3
  • 11
  • 22
2

See this answer for an example of serving multiple html pages using HtmlService. The basic idea is to write doGet() to accept a query parameter that it will use to select which html page to serve.

Community
  • 1
  • 1
Mogsdad
  • 44,709
  • 21
  • 151
  • 275