Majal
Majal

Reputation: 1741

Can Google Apps Script process GET query string and post to Google Sheets?

I'm trying to learn Apps Script. I wonder if it is possible for a script to receive GET requests and then enter the query string values to a Google Sheet.

For example, if we execute this command:

$ curl https://script.google.com/d/xxx-xxx-xxx/?header1=value1&header2=value2&headerN=valueN

Then we could expect a Google Sheet to be populated with column headers header1, header2, up to headerN along with rows of values from the query string.

Would this be possible? A simple sample Apps Script will be appreciated.

Upvotes: 1

Views: 1626

Answers (1)

Sourabh Choraria
Sourabh Choraria

Reputation: 2331

Yes :) This is possible. Please refer to the request parameters > e.queryString.

I suppose, that should do the trick but please feel to come back here again in case you require further clarifications.

Upvotes: 1

Related Questions