Programmatic access to Google Docs - google-docs-api

I have a need to generate and share Google Docs programatically. In this case, these are reports generated weekly from various sources like JIRA and a number of other tools used internally at our company.
The only documentation found so far seems to be related to use of Google scripts to generate documents.
Is there something similar to gspread for Google Spreadsheets that works with Google Docs? A python wrapper would enable us to collect the data from various sources and do some analysis before populating the report.

You may refer with this thread. It suggested that you need to create a blob of data representing your document in any of the formats listed here, depending on your programming language, simplest may be text/csv for a spreadsheet and application/rtf for a text-document. Then put in in an appropriately formatted POST data. You can also check the sample python code in the given link.

Related

Talend: use Google Spreadsheets as Input and Output

I'm using Talend for several ETL-jobs. Main focus on inserting and updating data defined in local Excel files to Salesforce. Excel and Salesforce are used as Input- and Output-Connections massively.
This works like a charm!
Now instead of Excel I need to use Google Spreadsheets as data inputs/outputs. Just manually download as Excel isn't good enough. Reason: I need a highspeed repeatable process executed thousands of times bi-directional. Uploading/Downloading XLS/CSV is not an option.
As an unfortunate, my researches concluded that there is NO Google spreadsheet connector available. I found this legacy-project which seems to be abandoned: https://code.google.com/p/google-talend-components/ - it is outdated from Talend-side as well as from Google (old API versions).
One other thing I've seen, is that Talend comes with Google Big Data Support: https://www.youtube.com/watch?v=BK6G3sTmwVE - Also Google Big Data might be somehow connectable to Google Spreadsheet - but I wasn't able to figure out how. Is this easy or hard? How to start? What to read?
I need to know if there is any viable approach to read and write data with Talend from and to Google-Spreadsheet.
Alternatively is there an other ETL-tool like Talend which has connectors to Google Spreadsheet AND Salesforce out-of-the-box?
Is there a direct google docs connector in Talend, no. But you can do what you are looking to do if you think of the problem a little differently. It sounds like you need to read and write to spreadsheets then upload/download from google. Lets take each problem separately.
Upload/Download
Google storage. If you need to upload and download files from google Talend has excellent integration with their API. As you mentioned, Talend --> Big Data has components to interact with Google Storage. This type of storage is primary meant as back end storage for an application.
In Talend under Cloud-->Google Drive there are components to upload and download from Google Drive. Google Drive is primarily meant as Chrome app and has direct integration with Google Docs.
Writing to Google Docs
Regarding your need to interact with google docs, you do not need any special components for this. Google docs can utilize csv and Excel formats. If you create and modify your documents in Talend using the standard file interaction components ( delimited, Excel, etc.) you can upload and download these documents using one of the two methods I described above (Google Storage or Drive) depending on what type of storage you are using.

get spreadsheet URL

I have a problem in my reporting, i create every day a google doc tracker where all the stack holders in my department update their work progress in it, so i have plenty of spreadsheets to monitor which is a hassle, here is what im trying to do, I'm trying to create a big google doc tracker where i can have an access over date applied in the normal spreadsheets, all what i need is the spreadsheet's URLs that exist in my google drive to be retrieved in this big tracker, with this i'll be able to drive all the needed data from the normal trackers.
PS: I'm not good with google scripts.
You can use the Drive Service to get a list of files with MIME type "application/vnd.google-apps.spreadsheet" using getFilesByType. This returns a FileIterator, which you can use to individually get each Spreadsheet file. From there, just use getUrl() to find the URL's. The FileIterator link has examples of how to loop through all the matching files.

How do I interact with Google Docs (Sheets) from another scripting environment (VB.net within Grasshopper3d)?

I'm scripting with VB.net (and sometimes with c#) within Grasshopper (a plug-in for a 3d modeling program called Rhino), and I'd like to interact with Google Docs, specifically with the spreadsheet app.
I want to be able to send data from Grasshopper to populate google spreadsheets.
The data is always either numerical or string.
I'd also like to generate charts from the data.
There is a solution to this at the bottom of this thread on the GH website.
.. And this is a solution for reading that should work in python as to use c# would need you to use other libraries.
You need to publish the spreadsheet as a csv first.
import urllib2
myUrl="https://docs.google.com/spreadsheet/pub?key=0AgIWT_wqd-VmdE1NekRSWFZoUnBQdWJhYUhwcU1vclE&single=true&gid=0&output=csv"
response = urllib2.urlopen(myUrl)
print response.read()
Here's a working GH implementation
[this should probably be a comment, but I can't comment yet]

How to get comments from Google Docs using the Google API

I want to get comments from Google Docs using the Google Drive API.
Does anyone know if the Google Drive API (or other Google Apps Application APIs) supports retrieve commenting?
Thanks.
Comments are included for documents via download as text (using the DocumentsList API), although it may be difficult to distinguish comments from the regular text.
Comments for spreadsheets are included when the item is downloaded as html (again, using the DocumentsList API), but not included when downloaded in other formats.
Comments for presentations, drawings, and non-Google types are not readily available.
Comments are not available via the API yet, but this is a common feature request that we are already evaluating. Stay tuned for updates soon.

Sync Google Calendar in Lua

Does anyone have an example how to sync data to Google Calendar via Lua?
Finally just changing a dates entry and reading its content.
Google does not offer a client library for Lua so you will have to use their REST API. This means the best way to get started is by looking at the documentation at http://code.google.com/apis/calendar/v3/getting_started.html.
Besides plain Lua you will need at least something like LuaSocket to retrieve and create data over the wire and based on a quick glance of their documentation some sort of authentication library is required as well (I found LuaOAuth with a quick google, but I can not recommend it because I have personally not used it).

Resources