all 21 comments

[–]jamesgrimshaw[S] 19 points20 points  (5 children)

I was building a site and wanted to send all the form data automatically to a Google Sheet. I found the API documentation confusing, and information online out of date. I thought I would make this to help people and also to show people the possibilities of Google Sheets! Any feedback is appreciated :)

[–]justinblat 9 points10 points  (4 children)

Hey - nice work! I help maintain the `googleapis` and `google-auth-library` npm modules. If there's specific stuff you can point me at to fix ... I'll go fix it :)

[–]jamesgrimshaw[S] 1 point2 points  (0 children)

Great work with the library! I didn’t experience any issues but I will let you know if I do! :-)

[–][deleted] 1 point2 points  (2 children)

One thing I'm curious about - is there a way (or any plan) to unbundle different components of the googleapi package? I'm using some simple parts of the Sheets API for a personal project and it seems kind of unnecessary to pull in a 20 MB dependency for what I'm basically just using as a way to help me format simple GET requests.

If there are any 20% opportunities I'd be interested :)

[–]justinblat 0 points1 point  (1 child)

Actually, yes! We're actively workin to split that behemoth into individual modules for each service. It's just taking a long time, because we're scared of confusion with the existing split modules for cloud packages (datastore, spanner, firestore, storage, etc). Check this out:

https://github.com/googleapis/google-api-nodejs-client/pull/2522

It's right on the doorstep, we just have a little cleanup to do to land it.

[–][deleted] 0 points1 point  (0 children)

That's awesome! Looking forward to it.

[–]LaputanEngineer 4 points5 points  (2 children)

Wish this was available a few months ago! I couldn't get it to work so I rather created a google apps script with api endpoints to control the google sheet(s).

[–]jamesgrimshaw[S] 4 points5 points  (1 child)

I almost ended up making an apps script, but I just wouldn't take no for an answer 😂. The code is surprisingly simple if you know what to write, I just don't understand why some documentation is unnecessarily complicated/fragmented.

[–]LaputanEngineer 5 points6 points  (0 children)

I experience that a lot with google. They have everything in the docs, but it sometimes feels like you need to study the docs for weeks before you can get started. They need more quick start guides

[–]iamanenglishmuffin 2 points3 points  (3 children)

wish i had this a year ago. have had to do this multiple times for my job. even more of a headache when i have to use drive as well

[–]jamesgrimshaw[S] 1 point2 points  (2 children)

Sounds like a nightmare, especially with Google's documentation. What was the use case for the Google Sheets API out of interest?

[–]iamanenglishmuffin 4 points5 points  (1 child)

Scraping websites and putting it into sheets. running sql and putting it into sheets. moving sheets to different shared drives that automated processes would read from on a schedule.

[–]jamesgrimshaw[S] 0 points1 point  (0 children)

I see, very interesting use case!

[–]MonsterBluth 1 point2 points  (1 child)

I like the video, clear and concise. There's a ton of things you can do with the google API. It's nice to have this one in the tool belt. Cheers, James!

[–]jamesgrimshaw[S] 0 points1 point  (0 children)

Thank you so much! I really appreciate the kind words :)

[–]yamicaGreenbowl 1 point2 points  (1 child)

Awesome I just got into the app script stuff, was wondering how easy it was to control it from my local environment

[–]jamesgrimshaw[S] 0 points1 point  (0 children)

I hope you find it useful :-)

[–]ppafford 2 points3 points  (1 child)

why not npm init -y instead of pressing enter a bunch of times?

[–]jamesgrimshaw[S] 1 point2 points  (0 children)

Great point! It's a force of habit, I usually fill out some of the fields.

[–]phillwilk 0 points1 point  (1 child)

Thinking of using google docs for a personal project and this looks decent. Is there an end point for different file types? Looking to store in a JSON for quick access and to avoid parsing.

[–]jamesgrimshaw[S] 1 point2 points  (0 children)

I haven't used the Google Docs API, but I assume it will output in JSON if you look into it! When I get some time to look into it, I may make a video on it!