Add data to Google Sheet using App Script || Hemendra

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ธ.ค. 2024

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

  • @muhummedrabbani5649
    @muhummedrabbani5649 5 หลายเดือนก่อน

    thank you so much bro, i had done the most silly mistake of assuming sheet name == filename. and was stuck debugging for over a week. when I saw your step-by-step walkthrough, I realized my mistake.

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

    Hello Hemendra, good job, this is great. Congratulations

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

    You`re a life saver, Thank you

  • @ildealcaide
    @ildealcaide 2 ปีที่แล้ว +5

    hello thanks for the video. When you run the script, it show you "TypeError: Cannot read property "parameter" from undefined. I have the same error. What you do for run correctly the script?

  • @itrustme4174
    @itrustme4174 3 ปีที่แล้ว +5

    Very nice explanation..!
    Can you please do one video for updating the sheet rows and deleting the rows !

    • @HemendraV
      @HemendraV  3 ปีที่แล้ว +5

      Sure. I will do it. Thanks for the suggestion.

  • @SedoSan
    @SedoSan 2 ปีที่แล้ว +2

    I did exactly the same as you did but when I run the code I get an error: "TypeError: Cannot read property 'parameter' of undefined". What would be the problem?

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

      JUST Copy This, And it will work
      var wbook = SpreadsheetApp.openByUrl();
      var sheet = wbook.getSheetByName("Sheet1");
      function doPost(e){
      addUser(e);
      }
      function addUser(e){
      var user = JSON.parse(e?.postData?.contents);
      sheet.appendRow([ user.Name, user.Age, user.Phone, user.Email, user.Address, user.Instagram, user.School]);
      return ContentService.createTextOutput("Sucess").setMimeType(ContentService.MimeType.TEXT);
      }

    • @OMGdon
      @OMGdon ปีที่แล้ว +2

      If change like:
      let action = e?.parameter?.action
      No error during run, but POST still do not work
      BTW, on video the same error
      UPD. Do not forget to redeploy after code correction. Now work!

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

      @@OMGdon you saved my life, I have the same error bro.

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

    Thanks for the video, but when I try to make a POST request, I have problems with CORS.

  • @abdullahquhtani4247
    @abdullahquhtani4247 3 ปีที่แล้ว +4

    I have a suggestion🤔. Could you take it one step further and post and get nested array which is like relational database. For example student and courses or employee and his working days …. etc.

    • @HemendraV
      @HemendraV  3 ปีที่แล้ว +2

      thanks . I will do it soon.

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

      @@HemendraV Thank you . Highly appreciated.🙏

  • @jean-baptistedebesombes3435
    @jean-baptistedebesombes3435 2 ปีที่แล้ว +1

    Thanks Hemendra !
    I have a question if we want to push multiple rows of data from a a json with several entries as the actual script only work with one row, how would you amend you code to to that ?
    Best r.

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

    How does it work with cUrl PHP

  • @cutepetvideos196
    @cutepetvideos196 9 หลายเดือนก่อน

    What about Delete data and update data. Stuck in these both

  • @RajinderMaini
    @RajinderMaini 6 หลายเดือนก่อน

    Hi,
    I am new to google apps-script. Had come across your video by sheer chance, and I liked it.
    I want to learn more about GAS (google apps script) and how to deploy it for web/mobile applications.
    Please guide me to grow.

  • @olmzy5812
    @olmzy5812 4 หลายเดือนก่อน

    nice video👍

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

    hi thanks for video, i have problem, when i hit from my Frontend, i got CORS, can we solve the cors?

  • @azwanmohamad3021
    @azwanmohamad3021 2 ปีที่แล้ว +1

    How to enable the script editor? I really need help... please help me... all I got is Apps script and it say "Sorry, unable to open the file at this time. Please check the address and try again." it quite frustrating because I cannot find any video that show how to solve this problem

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

      I'm getting the same with my post requests when trying to send data in the body of the request.
      Should work if you send your data as part of the querystring (after the ? charachter in the link, like this: [your_deploy_link]?[datakey1=data1&datakey2=data2]).
      Btw I don't think this is clean nor safe to do-I'm also getting many other problems with Apps Script-so I think I'll move to a different, serious backend.

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

    Possible to edit data conditionally

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

    congratulations, how would you have an api that had query, update and insertion?

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

    Thanks for the video
    What about sending api from sheet.
    Not a manual changed cells but cells that changed by formulas?

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

    Hi! Hemendra, thank you for the video, I am not getting the success response when i test it in Postman. Getting result as "the Script completed but did not return anything". Can you please? I did exactly same as you did in the video.

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

    Update delete insert?

  • @rajatnagpure610
    @rajatnagpure610 2 ปีที่แล้ว +1

    Awesome!

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

    Thank you sir
    Your video helped me.please continue with these tutorials🤩🤩

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

    How to implement in custom form

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

    Very useful. thank you sir

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

    Thank you so much sir. Subbed.

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

    very nice! Thanks

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

    Hi! Hemendra, thank you for the videos! How would you filter the results?

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

    how to send multidimensional array of object? Please!

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

    Very good video helped a lot.
    I would like to save an image as well, I saw that google drawings allows saving, publishing and getting an html code that can be used in HTML projects. Could you help me create a script that also saves images?
    Thanks

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

    I'm stuck on making it work when deployed with "Only myself" access.
    On the browser it prompts the Google authentication page and then it works, but I don't know how to authenticate from a generic client (in my case, an Android app): I only get 401-unauthorized response, since I don't know how to set the Authorization header (probably requires OAuth2 token??)
    Any help or resource is much appreciated!

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

    It worked me ...thank you...

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

    Hi Hemendra, can you help to create another example using a JSON Array of Object?

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

    How to post 2d array using loop? Please!

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

    Pls thanks so much for the video , and can you show us how to PATCH and PUT record thanks ....

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

    Please make a video on sending 2D ArrayList Data to Google sheet, Thank you

  • @Rajan-sl9ct
    @Rajan-sl9ct 3 ปีที่แล้ว

    How to send Data (Post Request) from sheet to any URL . using app script Thanks in advance

  • @sarveshchauhan5096
    @sarveshchauhan5096 2 ปีที่แล้ว +1

    Thanks bro

  • @ekanshsinghal9624
    @ekanshsinghal9624 2 ปีที่แล้ว +1

    Getting unauthorised 401

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

      Did you set the Who has access property to Anyone, while deploying?

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

    this app script End point only work in postman not other platform