[Google Apps Script] Read a web app query parameter

Created on November 30, 2026

The event passed to an Apps Script web app's doGet(e) function exposes the first value for each query parameter through e.parameter. This example reads some_string and returns it in a text response.

function doGet(e) {
  var textOutput = ContentService.createTextOutput('message is ' + e.parameter.some_string);
  return textOutput;
}

After deploying the web app, send a GET request with ?some_string=hello appended to its URL.

message is hello
Google Apps Script