I just made my first useful program (javascript) last week, but it was exhilarating to realize that I never have to to this repetitive **** again. So bear with me, since I might ask a simple question.
I'd like to, from google sheets, create separate page for each client listed in the sheet, on my wordpress page.
Is that possible?
It's a simple question, but it might save me countless of hours figuring out how, if there's actually no way.
Google Sheets cannot do it by itself, but you can make a program which will download data from Google Sheets API and then by WP REST API create posts on your Wordpress site and put data as content.
Link to WP REST API
You can also make Wordpress site download data from Sheets and then create posts.
There is a third option: make Google Apps Script which will operate on Sheets and on WP REST API.
Related
Can anyone assist with updating multiple google sheets using java script.
I have 100+ google sheets with my suppliers, and I need a way to make updates to them all via a script.
For example. I want to be able to make changes to a central script which I have, that will add new data to to the Sheet Tab "Samples" in cell A1 for every sheet url with my suppliers.
I have a list of the unique URLs to add, I just need some help in creating a script.
There are obviously many other changes, but just getting a start will hopefully help me progress some.
Any help is gratefully received.
Is it possible to use either Google Apps Script or the Google Sheets API to host a REST API, so that I can make client-side content requests on a static web page? If so, how would I go about this?
I'm building a simple website hosted on GitHub, and I want to experiment with using a spreadsheet as a content management system, e.g. fetching a running list of projects with corresponding text, images, etc.
Forgive me if I completely misunderstood the capabilities of either/both of these applications, or overlooked a previous ask!
You can use the Sheets API with multiple languages.
Here you have the different quickstarts that show you how to do it: https://developers.google.com/sheets/api/guides/concepts
Also you can create a Web App with Apps Script and embed it in your website: https://developers.google.com/apps-script/guides/web
I've been researching javascript, jquery, xml, google scripts, and the google spreadsheet api, with little luck. I'm trying to create a website that uses a google spreadsheet as a database. It needs to run on a chrome book.
Hosting sites on google drive doesn't seem to allow jquery. So I can only use html, css, and javascript, that I know of. I usually create asp.net sites with a C# backend, but I can't seem to figure out how to even get data from a published google spreadsheet to display on a google drive hosted website.
Do any of you have a path that you would suggest? I'm all for researching myself but I need a good starting point which I have yet to find.
Thanks
There is a GitHub library for PHP, if your site happens to use PHP
github.com php-google-spreadsheet-client
There are a few options:
Google Sites - With a Google Stand Alone HTML Apps Script in a Apps Script Gadget
Google Stand Alone HTML Apps Script
Website that Uses the Sheets API
If you try to access a Google sheet from a website with a different domain name, you will get a CORS error. CORS is a Cross Origin Resource Sharing. Each option for connecting to a spreadsheet has it's own issues. If you use a Stand Alone HTML App with Apps Script, you can't have a domain name. A free Google Site, doesn't have a domain name, but it's a nicer URL, and a Google Site can be mapped to a domain name. A website with a regular domain name, will require an API to do something with Sheets. The documentation for the Sheets API show examples written in Protocol, Java, and .Net. But, the documentation states:
A number of client libraries are provided in various languages. These client libraries make it easier to interact with the Sheets API.
But I don't see any reference to where all these various languages are.
I don't know of any easy to understand documentation for using a Google spreadsheet as a data source from a website. So, unfortunately, I don't know of an easy answer. The answer depends on what you want/need, and how much time and skill you have to set it up.
So, do you need a domain name or not? You can map a Google Site to a domain name:
https://support.google.com/sites/answer/99448?hl=en
But the documentation also states:
You can't map your domain to what is known as a naked domain, such as http://example.com
If you need to use a website and connect to the Google spreadsheet with an API, you'll need to run an authorization. Otherwise, any website could read/write to your spreadsheet.
Obviously there are websites that write data to Google spreadsheets, so it's possible.
You can also look at posts like this:
google-spreadsheet-api-with-php
how-do-i-access-the-google-spreadsheets-api-in-php
I'm trying to provide external websites that aren't controlled by me some information they need to publish such as live inventory data. I'd like to provide them some Javascript that they can put on their site that I can control via a Google Sheet.
Here's an example:
Google Sheet A - Column 1/Row 2 = 6
With this code I provide, the external web admin makes his page say:
"We currently have 6 cinnamon rolls available"
Then someone comes in and buys two rolls. I go to the Google Sheet and update Column 1/Row 2's cell to '4' and now that same page says:
"We currently have 4 cinnamon rolls available"
Essentially i'm trying to create a CMS controlled by Google Sheet cells. I've been scouring the web and can find some attempts made in 2011ish, but I'm hoping there is a way that is as easy as embedding a YouTube video.
There is no way that's "as easy as embedding a youtube video". You need to have a server that scrapes the content of the sheet then publishes it back out.
I found something that is close enough to what I was trying to accomplish at the time, so I figured I'd share. Sheetrock is a Javascript library that allows you to use your Google Sheet like a database.
http://chriszarate.github.io/sheetrock/
While looking to process a few variables from a form, and send that data to a Google Drive Spreadsheet, I found that Google Apps Script, fits better for my purpose, it just catchs all the data in a regular html form, and sends that data to my Google Drive Spreadsheet, without depending on a special type of google form, and without matching var names, vith values.
Am I missing something?
Regards!
Google Tag Manager gives you the power to create and update tags for your website and mobile apps, any time you want, at the speed of your business. You can go through the documentation here.
You can also refer to this page for more idea on what Tag manager is.
For your requirement of getting the data from a form to a Google Spreadsheet, Google Apps Script fits better.
You can refer to these links for more information of Appscript:
https://developers.google.com/apps-script/guides/sheets#connecting_to_google_forms
https://developers.google.com/apps-script/guides/html/
Hope that helps!