Make an API With Google Sheets and Google Apps Script

  Рет қаралды 63,679

Cukmekerb's Coding Class

Cukmekerb's Coding Class

Күн бұрын

Пікірлер: 64
@kevalsanghvi3045
@kevalsanghvi3045 3 жыл бұрын
Excellent video. It was very useful. Every other video on this topic showed this by third party websites and requests are very limited. And no one other then you showed this without using such websites and also explained the whole code beautifully. Thank You for sharing your knowledge. Keep making such informative videos.
@peterberumen854
@peterberumen854 2 жыл бұрын
I see so many people with the same issue but not solution! TypeError: Cannot read property 'parameter' of undefined (line 2, file "Code") Whats the fix??
@josepalomarespalacios
@josepalomarespalacios 3 жыл бұрын
ReferenceError: propertiesService is not defined (línea 5, archivo "apis") . Any help?
@rb8058
@rb8058 9 ай бұрын
Coming late to this video but appreciate the walk through! Is there a way to include the column header info as tags for each row of data? Or do you have another video where you get into how to do that?
@alkan4883
@alkan4883 3 ай бұрын
I dont know if someone is still there, but even when i copy exactly the same code, it is not working , when i go on the link i get an error page with "Unable to open the file at this time."
@alkan4883
@alkan4883 3 ай бұрын
but when i deploy it with "only myself" it's working
@alkan4883
@alkan4883 2 ай бұрын
I've identified the problem on my own. First, you need to log out of all your Google accounts. Then, the first account you log back into will be set as your default account. After that, deploy with "everyone," and it should work right away.
@ademcihan892
@ademcihan892 2 жыл бұрын
con you help me TypeError: Cannot read property 'parameter' of undefined (satır: 2, dosya: "Kod")
@inf7549
@inf7549 Жыл бұрын
this is like playing the Gollum game but in tutorial form for developers
@tonmoitanvi1773
@tonmoitanvi1773 3 жыл бұрын
oh, it was easy though, do you think it's better than the Sheet Best API tool? what do you think? do you have any suggestions for that?
@cukmekerb
@cukmekerb 3 жыл бұрын
I haven't heard of that one before, but I have tried similar services and they have rate limits and they're really slow
@mimocrocodile5069
@mimocrocodile5069 2 жыл бұрын
Perfect. Just in time i found this video
@learning9716
@learning9716 Жыл бұрын
Perfect ! It's working...
@kfl-appsheet6167
@kfl-appsheet6167 Жыл бұрын
Exception: Login information disallowed: may i know reason while executing appscript
@maximilianogabrielfranchve7367
@maximilianogabrielfranchve7367 2 жыл бұрын
Hi! Awesome video. That's what I was looking for. I was wondering if you could make a video for POST request, as I need to send information from a chatbot to google sheet.
@watchonlinemovies2919
@watchonlinemovies2919 3 жыл бұрын
TypeError: Cannot read property 'getId' of null code.gs:24 24: PropertiesService.getScriptProperties().setProperty("key", doc.getId()) i got this errer plz.help
@cukmekerb
@cukmekerb 3 жыл бұрын
Doc is undefined
@culturauniversalTV
@culturauniversalTV 3 жыл бұрын
PropertiesService.getScriptProperties().setProperty("key", doc.getId());
@BrodieTheAthlete
@BrodieTheAthlete 3 жыл бұрын
do you have the source code any where?
@cesarantunes4004
@cesarantunes4004 2 жыл бұрын
Excellent, it works perfect for me, thank you very much!
@flexible8ark
@flexible8ark 3 жыл бұрын
I followed your code, but the following message came out. The following script function (doGet) could not be found. Do you know what's wrong?
@cukmekerb
@cukmekerb 3 жыл бұрын
try saving it and redeploying. sometimes gas doesn't recognize a save
@dorjeewangchuk7752
@dorjeewangchuk7752 2 жыл бұрын
TypeError: Cannot read property 'getLastRow' of null (line 7, file "Code")
@jeremray4620
@jeremray4620 3 жыл бұрын
very useful thanks a lot !! how can we have the result without double "[ " I mean this = {"data":["John Smith","Just some rando"],"error":false} instead of = {"data":[["John Smith","Just some rando"]],"error":false} many thanks again
@malliditarunreddy
@malliditarunreddy 3 жыл бұрын
just create another empty list and push the present list into it and return the new list and you are done ; )
@yes_daily_motivation
@yes_daily_motivation 3 жыл бұрын
Can we make post request too using this api? If yes, please tell how?
@cukmekerb
@cukmekerb 3 жыл бұрын
yes, just replace doGet with doPost
@irpcplebsection9677
@irpcplebsection9677 3 жыл бұрын
what is empty array in last row ?
@hamzach933
@hamzach933 3 жыл бұрын
From where i can this wallpaper like your desktop wallpaper? Thanks!
@cukmekerb
@cukmekerb 3 жыл бұрын
It was one of the builtin MacOS ones, but they got rid of it recently :(
@hamzach933
@hamzach933 3 жыл бұрын
@@cukmekerb Version please?
@cukmekerb
@cukmekerb 3 жыл бұрын
It’s still in mojave and maybe catalina
@rajkishan3690
@rajkishan3690 7 ай бұрын
Great Video.
3 жыл бұрын
Great video! I tried it but it's giving me an error. ReferenceError: sheet is not defined (line 7, file "Code") Any ideas how to fix it?
@Ryan-tr3gs
@Ryan-tr3gs Жыл бұрын
+1 Doesn't work
@Ryan-tr3gs
@Ryan-tr3gs Жыл бұрын
Did you get it to work?
@tuminspace
@tuminspace 3 жыл бұрын
I get this error; Error TypeError: Cannot read property 'parameter' of undefined doGet @ Code.gs 2
@michaelhuskey2608
@michaelhuskey2608 3 жыл бұрын
Same here
@juanjofalcon
@juanjofalcon 2 жыл бұрын
use parameters
@karanjoshi12
@karanjoshi12 3 жыл бұрын
Hey unknown parameter error is popping up any solution for this ?
@cukmekerb
@cukmekerb 3 жыл бұрын
What exactly does the error say?
@ssj7gokurpg
@ssj7gokurpg 2 жыл бұрын
Excellent.
@hossainabeer
@hossainabeer 3 жыл бұрын
Hi, I literally copied every code of yours without error, and after publishing it as web page, I copied the url then pasted it, and got the following message: "Exception: Cannot convert 'function () { [native code] }' to int. (line 9, file "Code")" . Note: my sheet contains only two column of data just like yours.
@hossainabeer
@hossainabeer 3 жыл бұрын
and running the script, I got the message in terminal: "TypeError: Cannot read property 'parameter' of undefined"
@hossainabeer
@hossainabeer 3 жыл бұрын
the code: function doGet(request){ var query = request.parameter.q; var parameters = 2; var sheetname = "Sheet1"; var doc = SpreadsheetApp.openById(PropertiesService.getScriptProperties().getProperty("key")); var sheet = doc.getSheetByName(sheetname); var lastrow = sheet.getLastRow; var rows = []; var range = sheet.getRange(2, 1, lastrow, parameters); var values = range.getValues(); for(var row in values){ rows.push([]); for(var col in values[row]){ rows[row].push(values[row][col]); } } if(query != null){ var rowstoreturn = rows.filter(a => a[0] == query); return ContentService.createTextOutput(JSON.stringify({"date":rowstoreturn, "error":false})).setMimeType(ContentService.MimeType.JSON); } return ContentService.createTextOutput(JSON.stringify({"date":rows, "error":false})).setMimeType(ContentService.MimeType.JSON); } function setup(){ var doc = SpreadsheetApp.getActiveSpreadsheet(); PropertiesService.getScriptProperties().setProperty("key", doc.getId()); }
@cristcaballero
@cristcaballero Жыл бұрын
perfect , thanks
@videosforyou4228
@videosforyou4228 3 жыл бұрын
Is it possible to use the post request from Airtable and populate that website data into google sheets?
@12chachachannel
@12chachachannel 3 ай бұрын
You can do that with web app
@alexanderbelikov9876
@alexanderbelikov9876 4 жыл бұрын
Hi!) Thank you for video! Could you be so kind to advice - how to run google script from php? Thank you
@sumitsarkar839
@sumitsarkar839 2 жыл бұрын
Thank you :-)
@thesumitsingh1234
@thesumitsingh1234 3 жыл бұрын
are there any limits to using this? I mean any restrictions on the number of such requests that can be made using this method?
@cukmekerb
@cukmekerb 3 жыл бұрын
there are but they're very high
@AdamBJohnson1
@AdamBJohnson1 3 жыл бұрын
If anyone is looking for the Apps Script code from this video, I posted it here (plus a few additional comments): gist.github.com/adamjohnson/3d1e0d6349df8ba1ccf1e45c6d8da5d1 Google Apps Script recently updated their UI. FWIW, I couldn't get this code to work, but I was working with different data. Curious if anyone here can get it working? Let us know in the comments below.
@Mohamed-shehata-2023
@Mohamed-shehata-2023 2 жыл бұрын
thanks
@learning9716
@learning9716 Жыл бұрын
It's working for me.
@Mohamed-shehata-2023
@Mohamed-shehata-2023 2 жыл бұрын
thanks
@avasworkshop6812
@avasworkshop6812 3 жыл бұрын
I loved the JK Rowing part lol! So true! Nice video!! +1 sub Can you do some videos on creating desktop apps (python or java?)
@cukmekerb
@cukmekerb 3 жыл бұрын
Hey, I just watched your animatronic tutorial, it was really cool! I don't know java, but python is a really great language that I wish I could cover more. If you have any ideas for a python video, lmk. Also, I just subscribed to your channel.
@KushEzio
@KushEzio 3 жыл бұрын
@@cukmekerb Hi i was not able to use this link in postman.. how can i do that..?
@TA-wn6ci
@TA-wn6ci 2 жыл бұрын
dislike due to great JK Rowling bad mention. Glory to the honest people!
@dorjeewangchuk7752
@dorjeewangchuk7752 2 жыл бұрын
TypeError: Cannot read property 'getLastRow' of null (line 7, file "Code")
Подключаемся к API с помощью Google Sheets Apps Script
28:19
Алексей Куличевский
Рет қаралды 45 М.
Google Sheets - Python API, Read & Write Data
28:01
Learn Google Sheets & Excel Spreadsheets
Рет қаралды 192 М.
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 1,5 МЛН
Convert Google Sheets into a REST API
14:10
Better Sheets
Рет қаралды 12 М.
Control Google Sheets with Node.js / JavaScript (v4 API)
25:51
James Grimshaw
Рет қаралды 123 М.
Google Sheets - JSON API, Wep App - e.j1 p.1
23:04
Get __it Done!
Рет қаралды 36 М.
How to access an API with Google Apps Script
9:52
saperis
Рет қаралды 68 М.
Google Sheets… Your Next Database?
7:16
Fireship
Рет қаралды 404 М.
Google Apps Script Triggers Explained 👈🏽
14:32
saperis
Рет қаралды 33 М.
Call Rest API on Google Sheets using Google Apps Script
6:52
Code With Curt
Рет қаралды 43 М.
How ChatGPT Built My App in Minutes 🤯
8:28
Website Learners
Рет қаралды 2,7 МЛН