How to access an API with Google Apps Script

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

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

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

    30+ years of programming and still learning every day. Thank you for filling yet another gap in my knowledge with you clear and concise video.

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

      Thank you for learning with our videos 😀

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

      is it possible to make a copy disable for editor in google sheet?

  • @Jeff-fc7nf
    @Jeff-fc7nf 2 ปีที่แล้ว +6

    I been using app scripts to try and learn to code. I am super familiar with spreadsheet and their built in functionality but I am pushing myself to learn to code for more advanced customization. I want to learn how to work with API’s and wow this was such an amazing tutorial. Absolutely perfect. Cant wait to check out more of your content.

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

      Happy to hear the video was helpful. 😀

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

    To see you code and explain it as you go makes learning for me a breeze, even if it takes a bit longer. Love your teaching methods, Chanel! 😊

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

      Happy to hear you're learning with these videos. 😀

  • @TJTHEFOOTBALLPROPHET
    @TJTHEFOOTBALLPROPHET 11 หลายเดือนก่อน +1

    It's astonishing how much I've learned from you - I even my daughters are learning to code the correct way from your channel. God has blessed you with the amazing ability to take complicated development topics and explain them with the clarity of a first grade teacher. Being a 52 year old man entering the world of software development for the first time - I needed to start at 'A IS FOR APPLE!' Thank you and Much love from New Orleans!

    • @saperis
      @saperis  11 หลายเดือนก่อน

      Hearing that you and your daughters find these videos useful means the world to me. Thank you very much 🙏🏽

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

    Hey, Chanel - Thanks for the interesting post. I visit here, every 10 to 14 days, looking for a new training. Today, it is a skill I don't even need ... today ... but I have written notes and a searchable entry in my training log. Thanks!

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

      Love how you're into learning new things! Google Apps Script is super versatile and you never know when it might come in handy. 😀

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

    Great video -- covered a lot of techniques all at once. Looking forward to hacking weather info and the spreadsheet API.

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

    woww you have made such a great platforms to learn. love the way you teach.

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

      Thank you 😀

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

    This is exactly the kind of thing that I'm trying to learn, and pitched at exactly the right level for my ability. Thanks so much! :)

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

      Happy to help! 😀

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

    Very interesting. Thankie!

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

      You are welcome 😀

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

    Was really helpful! Thanks a lot for this demo, inspired me to write automation scripts to export sheets processed data to CSV and other formats for external systems 🙌

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

      Great to hear! 😀

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

    Hi Chanel, thanks a lot for this tutorial, it's great. I've implemented others elements about response... I'd like to try to make a forecast request, it's simple but i don't know how manage the response for others days... Can you help me please

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

      Thanks for watching this video. I'm sorry, but I don't offer any coding services or mentoring.

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

    Very cool

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

      Glad you like it 😃

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

    Hi, in your example you know your headers in advance. Can you pull data and create two dimensions without specifying the header names?

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

      Do you mean the column headers? In my tutorial I don't refer to any column headers.

  • @mooshroommoon
    @mooshroommoon 3 วันที่ผ่านมา

    Hmm… I wonder if I could convert this to google sheets using some css for ui… probably a GitHub thing.

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

    Thanks for the case. For some reason, the picture quality is not very good, although the resolution in the application is set to maximum when viewing. If the zoom in the browser when recording was larger, it could help, but.... but now you have to look closely.

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

    Love your explanation.
    but if i may suggest or you can say it's a request.
    since we have this 2 giants tech industries competing each others. i mean, microsoft now have microsoft graph and google have google app script. could you considering to make a video how to connect to Azure AD or MS Graph from GAS? Thank you.

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

      I don't do any Apps Script videos anymore on this channel. Find out why: th-cam.com/video/OHd_xEabivg/w-d-xo.html

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

    Thx very much for this...even im not using it for google based app but now i know how to use api on my website. Hopefully ur succes on your journey saperis

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

      Glad it was helpful! 😀

  • @santoshdhere8033
    @santoshdhere8033 8 หลายเดือนก่อน

    Hi Chanel, Thanks a lot!! You are doing great work and sharing your valuable knowledge with us.. I am trying to access the api through the app script code but received DNS error. Could you please help me out or suggest

    • @saperis
      @saperis  8 หลายเดือนก่อน

      Maybe the API endpoint (e.g. the address) has changed? Please check the API providers documentation.

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

    Hi I am beginner to Google Apps script please make a video on how to use Google sheet API service directly on Google app script like Sheets.Spreadsheets.Values.get(spreadSheetId,dataRange) not anyone had made videos on this topic on entire TH-cam love form India

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

      Thank you for watching this video. I don't do any Apps Script videos anymore on this channel. But I invite you to check out the Google Workspace Developers TH-cam channel: www.youtube.com/@googleworkspacedevs

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

    Excellent tutorial. A one-click code download link would be nice, too!

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

      Thanks for watching 😀

  • @BiokhojTeam
    @BiokhojTeam 11 หลายเดือนก่อน

    I am able to redirect URI which has auth_code (within URL) and this url showing specific error, How can I get the auth_code in HTML page or can get specific sheet cell ?

  • @rajeshsingh-joomla-expert
    @rajeshsingh-joomla-expert 2 ปีที่แล้ว

    Hi,
    Can you make a video on how we can sell gsute addon on google workspace marketplace, and how to licensing process will be integrated in the addon that we want to sell

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

      Thanks for your request. I can't promise that I will make such a video.

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

    This was really helpful. I was wondering how do we connect to sharepoint and download a file using this. Thanks in advance

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

      I don't know. Does Sharepoint have an API you can use?
      When you wan to use an API, you always have to A) check if the creator of the system provides an API and B) check their documentation on how to use the API.

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

      @@saperis if interested I can get back to u with information

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

    Hi, can I ask if the API key is in their header rather than as part of the URL, how should we adjust the code?

    • @saperis
      @saperis  9 หลายเดือนก่อน +1

      Have a look at this Stackoverflow answer: stackoverflow.com/questions/65197929/google-app-script-urlfetchapp-fetch-api-key-header-getting-401-error

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

      thank you@@saperis

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

    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

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

      We don't release any new Apps Script videos on this channel and neither do we create scripts for others.
      To nudge you in the right direction I suggest you check out the documentation for Google Drawing class: developers.google.com/apps-script/reference/spreadsheet/drawing

  • @sbbillusionist
    @sbbillusionist 11 หลายเดือนก่อน

    Great Video! Quick Question: What if the API has restricted access? Is there a way to sign into the service?

    • @saperis
      @saperis  11 หลายเดือนก่อน

      That depends on the API. Usually, you will find information on how to access an API that requires payment or something else, on the API's provider website.

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

    Hi, how do I replace the url when using OpenWeather or Visual Crossing? Am a beginner and have entered all this code, but Weather API is not free anymore. Not sure what code http code I need to enter? Thanks

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

      You always have to use the URL that the API provider gives you. Usually this should be in the API documentation.

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

    Love your work, keep up the amazing content!

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

      Thanks a ton!

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

    Is it possible to setup google sheets to post into google chat certain data when a keyword is sent?

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

      Yes, you could do that. Have a look at how to create a webhook, which probably would be the best of doing what you want to achieve: developers.google.com/chat/how-tos/webhooks

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

    Hi saperis
    I want to auto populate some field in Google form and i am using Google sheet as backend is that possible?all my data i have to populate is in Google sheet
    I hope you reply soon

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

      Sure, that's possible. There is no video on this channel showing how to do so though.

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

    Hello!!! Can you also tackle on how to duplicate a template google sheet automatically if a date changes using apps script? Thank you for these helpful videos!!!

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

      I try to create videos for topics that are often searched for on TH-cam. So I generally can't promise to make videos for specific requests.

  • @SunilKumar-ob6vs
    @SunilKumar-ob6vs ปีที่แล้ว

    Can u make video how to read google sheet data using jason and display in html table format pls

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

      Sorry, since I've been hired to work for Google, I don't release any new Apps Script videos on this channel anymore.

  • @phuongnamnguyen9856
    @phuongnamnguyen9856 8 หลายเดือนก่อน

    Hello,can appsheet connect with local network api?

    • @saperis
      @saperis  8 หลายเดือนก่อน

      AppSheet can call any API that is publicly available through the internet.

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

    Hey
    I am not able to get the icon for some reason

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

    well deserved like

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

      Thank you very much 😃

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

    is it possible to make a copy disable for editor in google sheet?

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

      No, a user with permission rights can copy a file or a script. There is no way of you disabling that.

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

    muito bom o onEdit seria ainda mais legal! parabéns amei

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

      Yes, you could use the onEdit trigger to automatically get the new weather data.

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

    Hi, How did you get response body. For me still API key has been disabled

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

      It is possible that this API has changed since this video was made.

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

    Can the App script send incoming data from the Telegram bot and then send the data to a spreadsheet?

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

      It depends on if there is a Telegram API you can use or if the Telegram bot provides a webhook you can use.

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

    why do you use let instead of var? any advantages?

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

      var was the original way to create variables. A couple of years ago let was added and can be considered somewhat superior to var.
      If you want the full details check this video: th-cam.com/video/q6V5Yeni9dI/w-d-xo.html

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

      @@saperis thank you so much for the explanation. I got used to using var, but really good to know you could use let too. Good day!

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

    This is really helpful, thanks. 👍🏻

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

      You're welcome

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

      @@saperis I've already built on your example. We have an event that runs once a month outdoors. I've updated the GAS that emails everyone involved with attendance numbers updates etc to include the weather forecast for the day 🙂

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

      @@TheDervMan Wow! Super happy to hear that you were able to use the demo from the video!

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

    How come the entire script worked, except 1 column of the final outcome: as in the icon doesn't show, all the numbers are correct. Any thoughts? Thanks!

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

      Don't know. When you get the data from the API, is the icon part of the data?

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

      @@saperis Yes, the icon is a part of the data but not showing. Here's what the code is , should be same as yours:
      let icon = data.current.condition.icon;
      let targetRange = sheet.getRange('A4:C4');
      targetRange.setValues(weather);
      let iconRange = sheet.getRange('D4');
      iconRange.setFormula('=IMAGE("${icon}")');

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

      @@SuitOfHearts I had similar problem. My solution:
      1. correct the line:
      let icon = 'https:'+data.current.condition.icon;
      2. note the characters ' '. You have to use ` ` instead in the line:
      iconRange.setFormula(`=IMAGE("${icon}")`);

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

    Is there any code to export reports from Google admin console to google sheet using appscript and API's

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

      That's not a topic I've ever looked into so I have no experience.
      Check the official documentation here: developers.google.com/apps-script/reference

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

    Hi! how about script that protect and unprotect sheet or range? thanks in advance. :)

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

      Check this documentation to see how you can set protection with Google Apps Script: developers.google.com/apps-script/reference/spreadsheet/protection

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

    Hi All,
    Currently I have the same issue when I ran the code to call an API, it show an issue, I made the same changes in my code but it was unsuccessful.
    The problem occurs on APPSCRIPT but when I ran the code on POSTMAN or SWAGGER it works well.

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

      Do a Google search with the error message you receive. That's what I do whenever I have code that doesn't work.

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

    Any chance you can share your script?! Saves me typing it all out again 😉

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

      Nope, we don't share any scripts. The typing is part of the fun of creating an automation script. 😀

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

    Ma'am, How do I get the API key?

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

      From the API provider. Let's say you want to use a specific weather API. You have to check on the website of the API provider how you can get the necessary key.

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

    how to hide a script in google app script for users, how a service provider to client

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

      Well, it depends. If they have to use or run the script, you can't "hide" it from them. If they absolutely shouldn't have access to the script, you should consider publishing the add-on or app to the Google Workspace Marketplace.

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

      Would creating a library meet my needs?

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

    Can you help expert?
    Create a Simple flow
    5-10 orders in 1st sheet,
    2rd. Sheet input order in Google sheets 50 cells, Copy respected cells paste in format Google Docs
    Send as PDF to (cc,bcc,to: Gsheets!48,49,50)
    Workflow for next 10 order process..... To be continued

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

      We do not create scripts for others. We share our knowledge through our videos so you can learn and create your own scripts.

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

    hello

  • @CTT36544
    @CTT36544 14 วันที่ผ่านมา

    - A correction in November 2024
    Replace your line 27 by the following:
    let icon = 'https:' + data.current.condition.icon;

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

    ✨ 𝖕𝖗𝖔𝖒𝖔𝖘𝖒