Google Docs tools
The 3 Google Docs operations your product runs on your customer's account through Connect. All of them use the same endpoint, POST /api/tools/{tool}/execute.
- Create documentPOSTCreates a blank Google Doc in the root folder of My Drive and returns it with its documentId. Add the content afterwards with Update document. To start from a template or in a given folder, copy or create the file with Google Drive instead.
- Get documentGETGets a document with its title, revisionId and content. The text is in body.content: each paragraph has elements whose textRun.content holds the text, with the startIndex and endIndex that Update document uses as positions, counted in UTF-16 code units.
- Update documentPOSTApplies a list of edits to a document, in order and all or nothing: if one request is invalid, none is applied. Each item of requests has exactly one kind of edit. replaceAllText fills a template without positions; the other kinds use the indexes from Get document. Send edits with indexes from the highest index to the lowest, so one does not shift the next.
See Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.
