How can I take a parameter by name, like:

var param1 = e.parameter.paramname1; 

The script is called as follows:

 https://script.google.com/macros/.../exec?c1=someval&k1_1=someval&k1_2=someval&c2=someval 

How to get the values ​​of the parameters c1, k1_1, k1_2, c2

    1 answer 1

    The script should be

     function doGet(e){ ... } 

    Upon request

     GET https://script.google.com/macros/s/.../exec?p1=2&p2=3 

    the parameter e will contain among other things

     { contentLength: -1 contextPath: "" parameter: { p1: "2" p2: "3" } parameters: { p1: [1] p2: [1] } queryString: "p1=2&p2=3" } 

    Getting parameter values

     var p1 = e.parameter.p1;