How to Use Google Sheets as a Simple CMS

แชร์
ฝัง
  • เผยแพร่เมื่อ 4 ก.ย. 2023
  • Let’s raise funds for St. Jude! codinginpublic.dev/fundraiser/
    While not ideal for anything complex, Google Sheets can act as a very simple CMS. In this video, I'll show you how to set up a simple API endpoint that returns the results of a Google Sheet as JSON.
    🔗 Key Links 🔗
    - Google Docs: developers.google.com/apps-sc...
    ---------------------------------------
    🎨 VSCode Theming
    - Font: Cascadia Code: github.com/microsoft/cascadia...
    - Theme: marketplace.visualstudio.com/...
    - Icons: marketplace.visualstudio.com/...
    ---------------------------------------
    🌐 Connect With Me 🌐
    - Website: codinginpublic.dev
    - Blog: chrispennington.blog
    - Twitter: / cpenned
    - Patreon: / coding_in_public
    - Buy Me a Coffee: www.buymeacoffee.com/chrispen...
  • แนวปฏิบัติและการใช้ชีวิต

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

  • @cspjdbh
    @cspjdbh 9 หลายเดือนก่อน +13

    This isn't something I was expecting learning today, but it does bring ideas for other things 🤔

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

      Yeah, not sure how much I’ll use it going forward but it’s a nice little tool when you need it.

  • @gyanaranjan6526
    @gyanaranjan6526 9 หลายเดือนก่อน +13

    Finally someone made Excel as database.

    • @CodinginPublic
      @CodinginPublic  9 หลายเดือนก่อน +6

      “Database” 😉

  • @andersonmarquesbsb
    @andersonmarquesbsb 9 หลายเดือนก่อน +7

    Unexpectedly useful. Haha. I don't think I'd ever search for this, but it gives me some ideas already. Will try to deploy something this week! Thank you 😎

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

      Ha same! I was racking my brain trying to think of a simple solution and this is what I found!

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

    Super cool. Thank you for sharing. 🙂

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

      You're welcome! I was surprised when I ran across this last weekend and just had to share! Could be useful occasionally!

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

    I was thinking something like this today. Totally shocked! 🎇

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

    nice thank you so much keep up the goo work!

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

    Instead of this method I pulled the data into my main server using a google service account json and broadcasted using a self hosted api. Then pulled into the other site I was running. I like this google scripts method. Might give it a go. I think there are higher limits when using the service account though.

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

    Awesome. Currently I use Google Sheets for project budgeting and then, imports my tables to my project proposal.. Maybe I con follow your approach to automate task.

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

    Keep up the good work ! 🙌🏻

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

    thank you for this video, i love it.

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

      You're welcome 😊

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

    Thank you man

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

    Very cool!

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

      Yeah, it was a fun discovery!

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

    that is pretty nifty!

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

      Don't tell the real devs, but I'm using this a lot and really enjoying it for simple little projects and forms. :) It's really nice when posting content, too.

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

    Please , can you make a full video on how this google sheet can be transformed into a complex database with more than 4 API endpoint, it will really be nice for my learning, Thank you😊

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

      I wouldn't use this for a more complex database :) So I probably won't be making a video on it. I'm hopeful this gave you enough to get started though!

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

    do you have more complex examples using gsheets?

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

      Not really. I don’t think I’d personally do something much more complex. At that point, I’d probably just use a CMS? Got any idea for how you’d use something more complex?

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

    Do you think it would be a good idea to use this as a cms for a job posting web app. I want to post only selected few jobs and most probably it'll be done manually.

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

      Possibly? Probably depends on how frequently the jobs would change. I have no idea how fast this is speedwise, etc.

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

    Will you make video about next or react again ?

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

      Sure, have plans for it! I typically just do videos on whatever I'm learning/working on at the time. Been on a big Astro kick with 3.0, but have plans for more React (I've never actually done anything with Next on the channel, but I just built a site with it…so it'll probably happen :)

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

    LOL, fun idea.

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

      Yeah, it was a nice way to provide a very low friction way to update the little landing page. Not sure on the speed of this but the site I used it on gets like 15 views a week and is literally a single page :) So figured if there was ever a time to try it, it was on this friend’s site.

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

    First time I did it when this video came out - worked and works just fine. But when I create a new sheet and make same steps it throws me an error: Unexpected token '

    • @CodinginPublic
      @CodinginPublic  8 หลายเดือนก่อน +1

      Is this a sheet in the same google doc that is working? If so, it's probably line 3 here: th-cam.com/video/15y1D1mGKdE/w-d-xo.htmlsi=VXqVrHXwU_DVthQ2&t=174
      You'd need to account for multiple different sheet names.

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

      @@CodinginPublic thx!!!

  • @cyberskul
    @cyberskul 3 หลายเดือนก่อน +1

    function doGet() {
    const doc SpreadsheetApp.getActiveSpreadsheet();
    const sheet doc.getSheetByName("Hours");
    const values sheet.getRange(1, 1, 5, 2).getDisplayValues()
    const result values.map((h) => ({
    name: h[8],
    hours: h[1]
    }))
    return ContentService.createTextOutput(JSON.stringify({data: result))).setMimeType(ContentService.MimeType.JSON);
    }
    "Not sure if correct but ye thas the code i guess"

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

    I was intrigued with the google sheets.
    But you explained it so well
    And im invested to give it a try 😎

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

      nice! Glad you enjoyed the video!