Apps Script Web App as Get and Post endpoint for JavaScript Google Apps Script Coding Example

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ • 42

  • @pattyh
    @pattyh 9 місяців тому +5

    Thanks so much for this video. Just wanted to comment for anyone who is following along the video and editing files as you go. I think the video skips a step after moving the "return ContentService.createTextOutput(JSON.stringify(data,vals)).setMimeType(ContentService.MimeType.JSON) from output(e) to doGet and doPost. After moving it, you need to replace it in output(e) with return data.vals; I checked the github code when I couldn't figure out why it wasn't returning anything after creating output function. Thanks again

  • @sue8386
    @sue8386 Рік тому +4

    you literally saved me!! This thing was driving me crazy for real. thanks!!

  • @vaibhavagar123
    @vaibhavagar123 6 місяців тому

    Thank you very much, this helped me a lot with my project 🙌

  • @nelsonchai7
    @nelsonchai7 9 місяців тому +1

    Thank you, very clear and easy understand.

  • @KresimirPendic
    @KresimirPendic Рік тому +1

    great video Laurence - very detailed and very helpfull! Have a good day man

  • @RemoteAppraisals
    @RemoteAppraisals Рік тому +1

    Thanks for the great video. I noticed the web hook link I used called doPost not doGet. I switched my function over and got my program working great! Something worth mentioning though imo.

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  Рік тому

      Thanks for the info! Yes for the webhook it needs the doPost() doGet() is just easier to demonstrate and test.

  • @boredomindex3353
    @boredomindex3353 2 роки тому +1

    Laurence delivers the best as always

  • @Ximaz-
    @Ximaz- 24 дні тому

    I waw wondering : is there a way to use the doGet route to get HTML page from GAS, including a form to perform a POST request to a doPost method ? I'm currently facing an issue because of the different s the GAS returns along with HTML. Any workaround for that ?

  • @renatonuneslima7995
    @renatonuneslima7995 Рік тому +2

    Great video. I'm having an issue: It's printing 'data' as "json() { [native code] }" after the get request. What am I missing?

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  Рік тому

      Are you outputting it a string version of the data object JSON.strinigify()

  • @MatheusSilva-qm3ph
    @MatheusSilva-qm3ph 2 роки тому +1

    Very cool.
    Thanks.

  • @WebiosGameplay
    @WebiosGameplay Рік тому +1

    Is there a limitation in the request? like a quotas in App Scripts?

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  Рік тому

      Yes there are limits, typically you should avoid running scripts that take more than 5 minutes to process. Chunk them into separate operations. There are also limits to the various services. developers.google.com/apps-script/guides/services/quotas

  • @lesptitsoiseaux
    @lesptitsoiseaux 2 роки тому +1

    I use it to connect and retrieve allot of data from an API. How would you do the spinning wheel or something to let the user know it's getting there?

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  2 роки тому

      There isn't direct way to tell how much of the packages are loaded, you may want to chunk it on the server end and use fetchAll or something similar which could be used to provide some more details.

  • @manzoorahmed350
    @manzoorahmed350 10 місяців тому

    Hi I need your help i have wordpress website and i’m using webba booking plugin for appointment is there any way that i can store appointment booking details automatically in sheet and it should be update automatically once customer book any appointment

  • @henryrivera8533
    @henryrivera8533 Рік тому +1

    Hello, I am using my web server and it gives me a CORS error. that could be happening?
    thank you

  • @alexpo87
    @alexpo87 Рік тому +1

    in this moment 12:07 i get string in browser
    {"contentLength":-1,"parameter":{},"contextPath":"","parameters":{},"queryString":""}
    not
    id= 1000
    why?

  • @kfl-appsheet6167
    @kfl-appsheet6167 Рік тому

    Exception: Login information disallowed: may i know why it it showing, i wrote rest api

  • @ymir05
    @ymir05 Рік тому +1

    TypeError: Cannot read properties of undefined (reading 'parameter')
    doGet .need help with this error.

  • @tazulislam2698
    @tazulislam2698 2 роки тому +1

    how to post bulk data to google sheet? Please

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  2 роки тому

      You could use a webapp and POST to that which can be used from a website, or web app.

  • @alexsandroalex7856
    @alexsandroalex7856 Рік тому +1

    please, how to send a list in a url without htmltemplate?

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  Рік тому

      Please connect with me on my website and I can provide additional contact information for someone that can assist you. basescripts.com/contact

  • @mytech11
    @mytech11 11 місяців тому

    error : Script function not found: doGet

  • @iBen-jz5xz
    @iBen-jz5xz Рік тому +1

    Doesn't work in fetch API. Curse cors.

  • @nolowcode
    @nolowcode Рік тому +1

  • @TheBlackBoyOne69
    @TheBlackBoyOne69 Рік тому +4

    I am using appscript web app doGet and facing CORS related issuse. How to configure CORS in app script project?

    • @LaurenceSvekisCourses
      @LaurenceSvekisCourses  Рік тому

      CORS is usually a script error, simplify the code until you can connect

    • @renatonuneslima7995
      @renatonuneslima7995 Рік тому +1

      Create new deployment and then update the URL in all of your code. It looks "old" deployments generate this CORS issue