No video

Google Sheets - JSON API, Wep App - e.j1 p.1

  Рет қаралды 35,800

Get __it Done!

Get __it Done!

Күн бұрын

Learn how to create self-made JSON API from Google Sheets using a Web App and make AJAX requests from external page.
Full Series Playlist • Google Sheets Self-Mad...
#googlesheets #json #api

Пікірлер: 75
@bang-naim
@bang-naim Жыл бұрын
I learn a lot. I have been rewatching this multiple times on multiple occasions. You're great at teaching, thank you so much.
@getitdonetube
@getitdonetube Жыл бұрын
Thank You!
@stefanbirsan3320
@stefanbirsan3320 Жыл бұрын
For those who have troubles with CORS. My issue was that I copied the wrong url to fetch from. The interface is a bit different now (JAN 2023). You'll want to go to DEPLOY -> MANAGE DEPLOYMENTS -> Copy URL for web app (ends in /exec). I had issues because I went to TEST DEPLOYMENTS and that url ends with /dev. And it has a different id. Hopefully this helps.
@getitdonetube
@getitdonetube Жыл бұрын
Thanks for sharing!
@stefanbirsan3320
@stefanbirsan3320 Жыл бұрын
@@getitdonetube Thanks for your tutorial!
@macreations0528
@macreations0528 18 күн бұрын
I tried with dev it was throwing same CORS issue.
@AlexM-ym7kd
@AlexM-ym7kd 3 жыл бұрын
You are a very good teacher, I appreciate these videos. It's funny that you're so good at this stuff that you can't get it to not work 🤣 8:55
@umeshagarwal4271
@umeshagarwal4271 4 жыл бұрын
I have been watching your videos, it's a great learning. Thank you so much for all the hard work you did. Blessings from India🙏
@usamanaeem8737
@usamanaeem8737 2 ай бұрын
Dude you are brilliant
@ashimov1970
@ashimov1970 2 жыл бұрын
Dude, you're the best. God bless
@getitdonetube
@getitdonetube 2 жыл бұрын
I appreciate that!
@66Komodo
@66Komodo 4 жыл бұрын
it is interesting to see what is possible with google sheets. cool videos. Please keep going. Thanks
@GVensino
@GVensino Жыл бұрын
Thank you! Saved me! This video is amazing. God bless you :)
@caizza3
@caizza3 3 жыл бұрын
Great video, i really like how you go through the documentation!
@sharonwan9813
@sharonwan9813 3 жыл бұрын
Thanks a lot for this clear and concise step by step video!
@desenvolvimentonavalcare3846
@desenvolvimentonavalcare3846 Жыл бұрын
Why did you put your JSON variable inside an array? at 1:07. Could it just be a JSON? Also, thank you SO MUCH for this video series bro.
@88gomo88
@88gomo88 10 ай бұрын
I'm following your videos and I learing a lot. Thank you! About this json api, how can I work if my API can be executed only by users from my domain? I guess i need a kind of google sign in function. Do you have any suggestions?
@soyezcloud
@soyezcloud 4 жыл бұрын
Why are you not using git to push changes to GitHub from vscode ?
@mateuslidonis
@mateuslidonis 4 ай бұрын
Is there any kind of usage limit for this API? Can I use and request the google sheets info as many times as I want?
@jhicinternational
@jhicinternational 3 жыл бұрын
excellent
@sudoalex
@sudoalex 4 жыл бұрын
Thank you very much for doing these videos!
@phecdu
@phecdu 3 жыл бұрын
Thank you so much. I think you can make a seri of google sheet API. That would be interesting. And you can share your code in git so every one can easy follow
@sistana
@sistana 2 жыл бұрын
Very clear, thank you very much. 100% high quality information. But how to avoid CORS restrictions with AJAX requests from other servers?. Thanks again
@getitdonetube
@getitdonetube 2 жыл бұрын
The only time I get CORS error is when I have some sort of problem in the code. Otherwise I'm able to call it from other servers just fine.
@stephankuche5859
@stephankuche5859 4 жыл бұрын
Thanks a lot very helpful .
@asifiqba1pa1ash
@asifiqba1pa1ash Жыл бұрын
can you show me how to interat withj shopify api with google sheet api? i want to append a row when any order creates, I want to show them on a google apps script web app, then there will be a button that sends shopify to mark an order fulfilled and notify customer to pickup from the store
@NickStoneDevelopment
@NickStoneDevelopment 3 жыл бұрын
AJAX Works as long as you either host on same source or don't have to use any JWT or CORS requirements. With Google, it's hard to believe you can securely store or get data without having to involve Google APIs and Google Console, generating API keys, scopes, app keys, etc. Is this just for public to public files and access?
@tazulislam2698
@tazulislam2698 2 жыл бұрын
Thanks! Please make a video on how to insert 2d array of value?
@dwadd7528
@dwadd7528 4 жыл бұрын
how do i fix CORS error? { mode: 'no-cors'} does not return JSON.
@getitdonetube
@getitdonetube 4 жыл бұрын
That usually means you have an error in your code.
@stevepineirov20
@stevepineirov20 4 жыл бұрын
Awesome video’s love them!!
@garylee5170
@garylee5170 2 жыл бұрын
So like I’m was saying to myself and Thanking to myself is what tha different of HTML and JSON and CSV?
@getitdonetube
@getitdonetube 2 жыл бұрын
CSV is a text file where columns are separated by commas & rows by a new line. HTML - web markup language JSON - JavaScript Object Notation, which is text formatted in a specific way to represent data en.wikipedia.org/wiki/JSON
@monarca2846
@monarca2846 2 жыл бұрын
Why I did not find this before?! Tks!
@philipevangelista3020
@philipevangelista3020 2 жыл бұрын
Great tutorial, thank you! This may be not related to your video but I'm trying to find out more about cookies and session data with the use of GAS. Unfortunately, I couldn't find anything on the interweb that would "mimic" storing session data of a web app (made with GAS). I want to store some sort of session cookie so that when a user logs in (or refreshes/goes to a different page), the session data is persisted through other pages as well (i.e. Names, Age, Reg info, etc). I hope that made sense and if you have any tips on this, would greatly appreciate it! Thank you!
@getitdonetube
@getitdonetube 2 жыл бұрын
Here is all you need kzbin.info/www/bejne/hmfVqaivg7lqitk
@hamidallahzakarya7224
@hamidallahzakarya7224 3 жыл бұрын
subscribed
@daytodatainc.2520
@daytodatainc.2520 3 жыл бұрын
Great video!
@dwburger
@dwburger 3 жыл бұрын
This is a very helpful video for a beginner like me. Just wondering...how can I console.log the response in the doGet function? I'd like to console.log the response from this return: return ContentService.createTextOutput(JSON.stringify(response)) .setMimeType(ContentService .MimeType.JSON); Thanks for any help or guidance you can provide!
@getitdonetube
@getitdonetube 3 жыл бұрын
Watch this kzbin.info/www/bejne/nJ3bm2CHd5pjsNE
@karthikpangala9854
@karthikpangala9854 3 жыл бұрын
Thank you.
@normanejm
@normanejm 2 жыл бұрын
HI, but how can it works for a external account?? I mean, I'm not the "owner" of that sheet, but I have to read the sheet...
@getitdonetube
@getitdonetube 2 жыл бұрын
I'm not exactly sure what environment you are in, but you can find examples here developers.google.com/sheets/api/quickstart/js For different environments check the left menu.
@PhamTienPhong
@PhamTienPhong Жыл бұрын
Does it expose all data to the network so anyone with WireShark can read all the data?
@getitdonetube
@getitdonetube Жыл бұрын
The end point is HTTPS, so it should be encrypted.
@PhamTienPhong
@PhamTienPhong Жыл бұрын
@@getitdonetube thanks for clarifying.
@tazulislam2698
@tazulislam2698 2 жыл бұрын
Does Anybody knowes how to send 2d array to google sheet?
@getitdonetube
@getitdonetube 2 жыл бұрын
What is the difference? So long as you know how to work with 2d arrays, just pass them the same way and handle them on the other end.
@roktinfast
@roktinfast 3 жыл бұрын
I can not get this to work. I had some code that communicated with a google sheet, using jsonp. It stopped working a month ago, getting CORS errors. I tried your version, but cant get it to work either. Could you perhaps revisit the subject in a new video, please?
@getitdonetube
@getitdonetube 3 жыл бұрын
I'm not sure, I've been hearing people telling that this doesn't work forever, yet every time I try it seems to be fine. I can tell you I've just tested one I had done and it works just fine for me today. I find that most of the time when people get CORS errors it's because the script returns an error instead of returning a valid JSON result. That being said, the issue here is that browsers auto-update for most people, so Chrome, Firefox or whatever browser you use could introduce some new policies and it may stop working. Not to mention that people also add all sort of extensions to their browsers.
@gergelykovacs6577
@gergelykovacs6577 3 жыл бұрын
@@getitdonetube Unfortunately It doesn't work for me either. I am producing a nice json output on the server, I can open it in the browser. I get the CORS error, whet trying to fetch from the page. I tried setting options to 'no-cors', and stuff, but it didn't help. The code is exactly like you showed though, with the difference that i am using a separate parameter for the json data output, like: '?v=json' (because i have multiple views). I am a little desperate.
@gergelykovacs6577
@gergelykovacs6577 3 жыл бұрын
My workaround: I have added fetch(url, {mode: 'no-cors'}) in the function definition, then on the end: .catch(function () { console.log("Promise Rejected"); This at least gave me an answer without red errors: 'Promise rejected'. Is there an option to set "Access-Control-Allow-Origin" : "*", on the server side?. I can't get around this.
@gergelykovacs6577
@gergelykovacs6577 3 жыл бұрын
I can even get the json response with curl , if I am followind redirects with -L flag, ang using exec version , not development version. But the client page still not able to get the response :(
@gergelykovacs6577
@gergelykovacs6577 3 жыл бұрын
I have even created a new very simple test project putting out a very simple one liner json on the browser. Still doesn't work from client side . Ia am only ale to log errors on the console, which is keep telling me about CORS error, and that 'No Access-Control-Allow-Origin header' is given. I was trying on latest Safari and Brave. Since these are quite quite advanced browsers, it should work with these.
@findthetruth3021
@findthetruth3021 4 жыл бұрын
Could you please make a cascade drop-down in HTML alone or anything that works?
@getitdonetube
@getitdonetube 4 жыл бұрын
I just did a 2hr video on cascading dropdowns which is published on the channel.
@georgejacob9891
@georgejacob9891 2 жыл бұрын
I was wondering if I could ask you a question about the fetch API. I am doing a post method using the fetch API on the client side. However, when I deploy the U app through Google sheets, I get the following error: (Reason: CORS header ‘Access-Control-Allow-Origin’ missing). Status code: 200. This is my code: fetch(url, { method: 'POST', // *GET, POST, PUT, DELETE, etc. mode: 'cors', // no-cors, *cors, same-origin cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached credentials: 'same-origin', // include, *same-origin, omit headers: { 'Content-Type': 'application/json' // 'Content-Type': 'application/x-www-form-urlencoded', }
@getitdonetube
@getitdonetube 2 жыл бұрын
remove mode: 'cors', // no-cors, *cors, same-origin cache: 'no-cache', // *default, no-cache, reload, force-cache, only-if-cached credentials: 'same-origin', // include, *same-origin, omit
@getitdonetube
@getitdonetube 2 жыл бұрын
and 'Content-Type': 'application/json'
@getitdonetube
@getitdonetube 2 жыл бұрын
So long as you have a valid request it should work fine.
@georgejacob9891
@georgejacob9891 2 жыл бұрын
Thank you so much! That worked. I am so grateful to you for creating these amazing videos. It allowed me to do so many things that I could not have done otherwise. You are an amazing teacher!
@UTJK.
@UTJK. 3 жыл бұрын
Why don't you share your code through github?
@ricardocnunes
@ricardocnunes 3 жыл бұрын
What code editor are you using? Thanks
@daytodatainc.2520
@daytodatainc.2520 3 жыл бұрын
VSCode
@somanathbhat5517
@somanathbhat5517 3 жыл бұрын
Is there a way to to add some sort of authentication, so that not everyone can access the spreadsheet API. It would be great if have videos that cover it it or post links that cover it.
@getitdonetube
@getitdonetube 3 жыл бұрын
There is certainly a way, but if you need it done properly, it's really not simple. You will need to create your own system of generating and handling JWTs (JSON Web Tokens). If you need something simple you can just create a key that you can check if it's valid on request. But this is not safe for serious work, since it's vulnerable to the key being stolen or hacked. I have seen worse solutions though :)
@somanathbhat5517
@somanathbhat5517 3 жыл бұрын
@@getitdonetube Your video was very clear and helpful. It was exactly what i was looking for. Thank you for the prompt response.
@sudoalex
@sudoalex 4 жыл бұрын
You made a typo in your hashtag, you typed josn instead of #json
@getitdonetube
@getitdonetube 4 жыл бұрын
Thank You! :)
@NickStoneDevelopment
@NickStoneDevelopment 3 жыл бұрын
JAVASCRIPT object notation
@deepakkoirala2296
@deepakkoirala2296 Жыл бұрын
Is this free? Is there a limit?
Google Sheets JSON API, Read & Write Data, Wep App - e.j1 p.2
34:06
Get __it Done!
Рет қаралды 17 М.
HTML Form to Google Sheets using JSON API Web App -  - e.j1 p.5
39:57
Get __it Done!
Рет қаралды 14 М.
ОБЯЗАТЕЛЬНО СОВЕРШАЙТЕ ДОБРО!❤❤❤
00:45
Zombie Boy Saved My Life 💚
00:29
Alan Chikin Chow
Рет қаралды 24 МЛН
Fortunately, Ultraman protects me  #shorts #ultraman #ultramantiga #liveaction
00:10
Update for Sheets Data as JSON for Web API using JavaScript fetch
12:34
Creating Webhooks for Google Chat App with Apps Script
45:23
Yagisanatode -Scott-
Рет қаралды 2,3 М.
How to Use Google Sheets as a Simple CMS
10:12
Coding in Public
Рет қаралды 10 М.
Use a google sheet as your web app database (Slingcode)
16:33
Google Sheets API - JavaScript NodeJS Tutorial
45:29
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 114 М.
Control Google Sheets with Node.js / JavaScript (v4 API)
25:51
James Grimshaw
Рет қаралды 119 М.
Apps Script: JSON Example
16:40
Jordan Rhea
Рет қаралды 23 М.
Develop Google Apps Script Locally in VSCode using CLASP
25:56
Get __it Done!
Рет қаралды 23 М.
How to VLOOKUP in Google Sheets with Apps Script?
17:16
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 38 М.
Google Sheets - How to Import JSON Array to your Spreadsheets?
13:51
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 24 М.