Tutorial - How to write Google Apps Script locally in VS Code with CLASP?

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ค. 2024
  • Buy Me Coffee
    If you've found this video worth your time and has helped you in your business and career I hope you'll consider buying me a cup of coffee. ko-fi.com/nibeshkhadka
    Intro
    In this video, you'll install Clasp. You'll then create a new project in Google Apps Script Home from your terminal. You'll also learn how to clone Apps Script Project to your computer. After that, you'll also find how to push changes you've made from VS Code to your cloud project. In the end, you'll filter the files to push with the ".claspignore" file.
    Blog
    Check out the blog version of this video at kcl.hashnode.dev/how-to-write....
    Chapters
    00:00 - Intro
    00:53 - Install Clasp
    01:42 - Enable Apps Script API
    01:57 - Login Into Clasp
    02:25 - Create a New Project Remotely With Clasp
    03:50 - Clone Google Apps Script Project With Clasp
    05:51 - Push Changes from VS Code to the Cloud
    07:16 - Filter Push with Clasp Ignore
    08:23 - Conclusion
    For inquiries:
    1. Linkedin: / nibesh-khadka
    2. My Website: nibeshkhadka.com/contact
    Blogs
    Check out my blogs at / script
    Hire Me
    I can automate your Google Workspace apps like Gmail, Gsheets, GDocs, GDrive, etc. as you need. I can also create workspace add-ons, web apps, and RESTful API using Google Apps Script. I'll provide high-quality service. Whatever, your needs are, do not hesitate to get in touch.

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

  • @kensleylewis
    @kensleylewis 9 หลายเดือนก่อน +2

    Nice work. I got it working on my end.

  • @pulsarlover
    @pulsarlover 8 หลายเดือนก่อน +2

    Thanks for wonderfull tutorial!!!

  • @EnriqueGonzalezOrtiz
    @EnriqueGonzalezOrtiz 7 หลายเดือนก่อน +2

    Very useful. Thanks for share!!

  • @cyoo0
    @cyoo0 9 หลายเดือนก่อน +2

    awesome tutorial

  • @khaled.noordin
    @khaled.noordin 6 หลายเดือนก่อน

    Thanks a lot buddy.

    • @codingWithNibesh
      @codingWithNibesh  6 หลายเดือนก่อน +1

      You're welcome!. And thank you for watching.

  • @RolandSchlosser
    @RolandSchlosser 2 หลายเดือนก่อน +2

    HELP, I have the files with my code I want to upload to Apps Script, but I want to upload them to a Google Sheet of my own, How do I do that? Because when I do clasp push after clasp create/clone, it creates a blank Google Sheet. How do I make that connection between files with code in my PC, to a new Apps Script from a Google Sheet with all the data I want to work with?

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

      When you’re pushing to the already created apps script its project ID should be the same as the one in the clasp.json file. The project ID can be found in the settings. Make sure to do that then, push to the apps script project in the cloud from a local directory.
      "Clasp create" creates new app scripts and new sheets if bound. I haven’t done it my self but I think you can also provide a source sheet, check out the documentation for that.
      If you already have a project in the cloud then clasp clone on the first try and then clasp pull/push after that is the way to go.

  • @akarumey2046
    @akarumey2046 29 วันที่ผ่านมา

    Hi!
    When I installed the clasp, I got error with code 'ERR_UNSUPPORTED_ESM_URL_SCHEME' when i try to check version by clasp -v.
    Do you know what is the problem?
    P.S. Node.js updated
    Updated:
    I unistalled clasp, Node.js, after that I installed it again and it works

  • @suhasparameshwara8447
    @suhasparameshwara8447 4 หลายเดือนก่อน +1

    Can we debug the code without pushing it in the cloud? Is there any options available?

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

      You know I personally don't do this. I prefer to run my functions in the cloud and just use VS code when I have to go heavy on JS side of things. But there's a option to run a Apps Script function locally with clasp. Check this out: www.npmjs.com/package/@google/clasp#clasp-run

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

    why can't I push my css files in the cloud? Can you help me?

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

      I haven't done it myself but Its probably because apps script does not support any other files except HTML and JS. So, it was likely automatically ignored by Clasp.