How to Use Google Sheets as a Simple CMS

Sdílet
Vložit
  • čas přidán 4. 09. 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...
  • Jak na to + styl

Komentáře • 43

  • @gyanaranjan6526
    @gyanaranjan6526 Před 10 měsíci +13

    Finally someone made Excel as database.

  • @cspjdbh
    @cspjdbh Před 10 měsíci +13

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

    • @CodinginPublic
      @CodinginPublic  Před 10 měsíci +2

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

  • @andersonmarquesbsb
    @andersonmarquesbsb Před 10 měsíci +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  Před 10 měsíci +1

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

  • @drewbird87
    @drewbird87 Před 10 měsíci +1

    Super cool. Thank you for sharing. 🙂

    • @CodinginPublic
      @CodinginPublic  Před 10 měsíci +1

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

  • @Omar45
    @Omar45 Před 10 měsíci

    Keep up the good work ! 🙌🏻

  • @hcoder
    @hcoder Před 10 měsíci

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

  • @simonswiss
    @simonswiss Před 10 měsíci +1

    Very cool!

  • @CHILLQOUTES
    @CHILLQOUTES Před 10 měsíci +2

    nice thank you so much keep up the goo work!

  • @surakadotme
    @surakadotme Před 10 měsíci

    thank you for this video, i love it.

  • @rodnoycry
    @rodnoycry Před 3 měsíci

    Thank you man

  • @mrrolandlawrence
    @mrrolandlawrence Před 4 měsíci

    that is pretty nifty!

    • @CodinginPublic
      @CodinginPublic  Před 4 měsíci

      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.

  • @marcociau3987
    @marcociau3987 Před 3 měsíci

    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.

  • @BENKORS
    @BENKORS Před 2 měsíci

    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.

  • @riigel
    @riigel Před 10 měsíci +1

    do you have more complex examples using gsheets?

    • @CodinginPublic
      @CodinginPublic  Před 10 měsíci +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 Před 10 měsíci

    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  Před 10 měsíci

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

  • @webstar722
    @webstar722 Před 10 měsíci

    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  Před 10 měsíci

      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!

  • @TheCrowdel
    @TheCrowdel Před 10 měsíci +1

    Will you make video about next or react again ?

    • @CodinginPublic
      @CodinginPublic  Před 10 měsíci +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 Před 10 měsíci

    LOL, fun idea.

    • @CodinginPublic
      @CodinginPublic  Před 10 měsíci +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 Před 9 měsíci

    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  Před 8 měsíci +1

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

    • @demetrycode
      @demetrycode Před 8 měsíci

      @@CodinginPublic thx!!!

  • @cyberskul
    @cyberskul Před 4 měsíci +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 Před 10 měsíci +1

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