Using doGet(e) Function to start Web App on Google Apps Script

แชร์
ฝัง
  • เผยแพร่เมื่อ 17 พ.ย. 2020
  • In this video, I show 3 examples of how to use the doGet(e) function to get the Web App started.
    Code from the video is in the comments below the video.
    Documentation From Video:
    developers.google.com/apps-sc...
    developers.google.com/apps-sc...
    Video, Code, and Documentation can also be found at:
    codewithcurt.com/how-to-use-d...

ความคิดเห็น • 20

  • @stevevalente4598
    @stevevalente4598 ปีที่แล้ว

    Congratulations, the best tutorial so far seen on the subject

  • @jayasri-ft8040
    @jayasri-ft8040 3 ปีที่แล้ว +2

    Wow. Nice presentation with good and demanded content what you have posted. Very kind of you bro.👍👍👍👍

  • @muhammedaadhil5645
    @muhammedaadhil5645 3 ปีที่แล้ว

    Very good step by step explanation. 👍

  • @nitingupta1417
    @nitingupta1417 3 ปีที่แล้ว +1

    good explanation bro!

  • @kensleylewis
    @kensleylewis 7 หลายเดือนก่อน

    Do you have a lesson on using the Post method?

  • @eltigre8475
    @eltigre8475 ปีที่แล้ว

    Please tell me what function you can use to get the request parameter from a reference to a variable, so that in the future this parameter value can be substituted in the right place?

  • @CodeWithCurt
    @CodeWithCurt  3 ปีที่แล้ว +1

    HTML File ExampleFile3 Code Below:




    Example File 3

  • @CodeWithCurt
    @CodeWithCurt  3 ปีที่แล้ว +1

    Google Apps Script Code Used in Video Below:
    function doGet(e) {
    Logger.log(JSON.stringify(e));
    Logger.log(e.parameter['message']);
    return HtmlService.createHtmlOutputFromFile('ExampleFile1');
    }
    //function doGet(e)
    //{
    // Logger.log(JSON.stringify(e));
    // Logger.log(e.parameter['message']);
    // var htmlOutput = HtmlService.createTemplateFromFile('ExampleFile2');
    // htmlOutput.message = e.parameter['message'];
    // return htmlOutput.evaluate();
    //}
    //function doGet(e)
    //{
    // Logger.log(JSON.stringify(e));
    // var htmlOutput = HtmlService.createTemplateFromFile('ExampleFile3');
    // if(!e.parameter['username'])
    // {
    // htmlOutput.username = '';
    // }
    // else
    // {
    // htmlOutput.username = 'Username is: ' + e.parameter['username'];
    // }
    // htmlOutput.url = getUrl();
    // return htmlOutput.evaluate();
    //}
    //
    //
    //function getUrl() {
    // var url = ScriptApp.getService().getUrl();
    // return url;
    //}

  • @CodeWithCurt
    @CodeWithCurt  3 ปีที่แล้ว +1

    HTML File ExampleFile2 Code Below:




    Example File 2

  • @CodeWithCurt
    @CodeWithCurt  3 ปีที่แล้ว +1

    HTML File ExampleFile1 Code Below:




    Example File 1

  • @tazulislam2698
    @tazulislam2698 3 ปีที่แล้ว

    Brother,
    I am requesting to send 2d array to google sheet using POST request? Please make a time for me.

  • @patricklafontaine4313
    @patricklafontaine4313 3 หลายเดือนก่อน

    Hi, I would like to use the browser by entering my url directly with params to make my get request... Its not working, do you have any ideas on this? Its working only in a software or something, if I enter the url with params in my browser it give error 500, come back later...or something! I try to update a cell in my sheet by clicking a button in a email, so I would like to make the button s link to call the request... Its the only way I could do it to capture the user click without opening another form or page... Thanks!

  • @kishorramani007
    @kishorramani007 ปีที่แล้ว

    getting this error: Error TypeError: Cannot read properties of undefined (reading 'parameter')

  • @alexsandroalex7856
    @alexsandroalex7856 ปีที่แล้ว

    how to send a list?

  • @lisandrotoranzo7837
    @lisandrotoranzo7837 2 ปีที่แล้ว

    I get this error: TypeError: Cannot read property 'parameter' of undefined
    What am i doing wrong? i just copied your code so i could analyze it myself as i started learning this like three days ago but i understand nothing

  • @xperimentsqf3823
    @xperimentsqf3823 3 ปีที่แล้ว

    is it share able link after deploy?

    • @CodeWithCurt
      @CodeWithCurt  3 ปีที่แล้ว

      The sharable link is the one I use to display the screen. You will need to give it more access then 'only myself' for other people to see it.