google-docs-api

Unable to add text to cell in new table row Google Doc via Docs API

可紊 提交于 2020-06-01 05:09:17
问题 I want to insert text to cell of Google docs table but I met issue bellow: Google.Apis.Requests.RequestError\r\nInvalid requests[1].insertText: The insertion index must be inside the bounds of an existing paragraph. You can still create new paragraphs by inserting newlines. [400] \r\nErrors [\r\n\tMessage[Invalid requests[1].insertText: The insertion index must be inside the bounds of an existing paragraph. You can still create new paragraphs by inserting newlines.] Location[ - ] Reason

Trigger webhook when Google Sheet edited

我与影子孤独终老i 提交于 2020-05-26 06:26:22
问题 I made a google sheet for sharing todo list with co-workers. My hope is when that sheet is modified, send message to slack channel. Even if tried to find api related with this, I failed to suitable one. Is there a appropriate API or webhook? 回答1: There's Drive API's Push Notifications which lets you watch for changes to resources. You can also use Apps Scripts' onEdit trigger which acts more like a real-time checker. function onEdit(e){ // Set a comment on the edited cell to indicate when it

Trigger webhook when Google Sheet edited

送分小仙女□ 提交于 2020-05-26 06:24:46
问题 I made a google sheet for sharing todo list with co-workers. My hope is when that sheet is modified, send message to slack channel. Even if tried to find api related with this, I failed to suitable one. Is there a appropriate API or webhook? 回答1: There's Drive API's Push Notifications which lets you watch for changes to resources. You can also use Apps Scripts' onEdit trigger which acts more like a real-time checker. function onEdit(e){ // Set a comment on the edited cell to indicate when it

Trigger webhook when Google Sheet edited

时间秒杀一切 提交于 2020-05-26 06:24:27
问题 I made a google sheet for sharing todo list with co-workers. My hope is when that sheet is modified, send message to slack channel. Even if tried to find api related with this, I failed to suitable one. Is there a appropriate API or webhook? 回答1: There's Drive API's Push Notifications which lets you watch for changes to resources. You can also use Apps Scripts' onEdit trigger which acts more like a real-time checker. function onEdit(e){ // Set a comment on the edited cell to indicate when it

Google API file permissions using python

泪湿孤枕 提交于 2020-05-16 23:00:12
问题 I need to do some functionality for different users of my site to automatically upload html files to google disk and open them for viewing and editing in google docs. To do this I create a document, pass it to google disk and use the id of the created document to open it in google docs. To access api, I use a json file taken from the service Google account. I tried to execute my code with owner and view rights, but the result is the same. class CvView(AuthorizedMixin, View): """Here I check

Apps Script vs Chrome Extension: Writing an alternative spellchecker to Google Docs

半城伤御伤魂 提交于 2020-05-16 08:55:50
问题 Say, I want to develop an alternative spellcheck module to google docs . This means that I have to get corrections from my backend, and color the misspelled text's background, and do a small popup bubble when user hovers over it, where I'd display the correction. (please mind that spellcheck is not the actual goal of my project, but it does address my problems in a more simplified way) What are my options? Any ideas how to do this? Few possible solutions I came up with: Chrome extension vs

Apps Script vs Chrome Extension: Writing an alternative spellchecker to Google Docs

你。 提交于 2020-05-16 08:54:28
问题 Say, I want to develop an alternative spellcheck module to google docs . This means that I have to get corrections from my backend, and color the misspelled text's background, and do a small popup bubble when user hovers over it, where I'd display the correction. (please mind that spellcheck is not the actual goal of my project, but it does address my problems in a more simplified way) What are my options? Any ideas how to do this? Few possible solutions I came up with: Chrome extension vs

How to upload a file to Google Drive using a Python script?

早过忘川 提交于 2020-05-07 10:14:07
问题 I need to backup various file types to GDrive (not just those convertible to GDocs formats) from some linux server. What would be the simplest, most elegant way to do that with a python script? Would any of the solutions pertaining to GDocs be applicable? 回答1: You can use the Documents List API to write a script that writes to Drive: https://developers.google.com/google-apps/documents-list/ Both the Documents List API and the Drive API interact with the same resources (i.e. same documents and

Looking for a way to add borders to a paragraph in a google doc using a Google Apps Script or perhaps the DOCS API?

余生颓废 提交于 2020-04-17 22:09:29
问题 It is possible to add a border to a google doc paragraph via the Format menu > Paragraph styles > Borders and shading . The result looks like this: However, I have not managed to work out how to do this using Google Apps Scripts? I have consulted the documentation concerning setting attributes, however, borders do no appear. It seems it is possible to set them using sheets and slides - but that isn't the use-case I am after. I used the DOCS API via node.js to download the sample JSON returned

Get the ranges of the elements in a google doc using Google Apps Script

試著忘記壹切 提交于 2020-03-28 06:50:40
问题 Following on from this question - I am now unsure how I might be able to target certain paragraphs or elements within the document when using Google Apps Scripts in order to use the batch update method outlined one would need to find the range of the element that required styling. If there were 10 empty paragraphs (with content of "\n",) in a document - how would it be possible to target the 8th paragraph and get the range values {"startIndex": xx, "endIndex": xx} relative to the document so