Skip to main content

Integration guideSeal API and Scripts

Google Docs

Reference Google Docs through the Google Drive library.

Illustration of a seal beside a laptop showing a data table and an evidence binder linked by a red thread.

Google Docs to SealSeal API and Scripts

Seal reads
Exported content of selected Docs, through the Google Drive library
Writes back
If agreed
Source of truth
Agreed when scoped
Set up
Scoped with your team
Neil › Linked record review
draft

Link these Google Docs records to the change they support.

Neil

  • Once the connection is configured, I’ll use the records it provides and cite each one. Anything it doesn’t supply stays listed as missing.
Reads
Exported content of selected Docs, through the Google Drive library
Returns
  • Google Docs records and the work they support
  • Missing or unmatched information
  • Next steps for your team to review
Illustrative work with Google Docs: a request to Neil, the source it reads and the draft it returns for your review.

1What’s connected.

Reference Google Docs through the Google Drive library: select files in a connected folder, and Seal captures their exported content for @ references. A connection set up with Seal’s API or Scripts is needed only to link Docs to review and approval in Seal.

Connection setup and permissions

Use Seal’s APIs or scripting engine for a connection tailored to your process. Agree the data mapping, access and direction of transfer before implementation.

2Capture a Google Doc’s exported content at a known version.

Route

Drive’s files.export exports a Google Docs file to a requested type, such as Word, OpenDocument, PDF, plain text, HTML, EPUB or Markdown.⁠¹²

Record identity

Drive identifies the file by its file ID, and the Docs API identifies the same document by its document ID.⁠³⁴

Revisions

A file’s version number rises with every change on the server, and modifiedTime records the last one. headRevisionId is only for binary files, not Google Docs.⁠³ Revision lists can be incomplete for frequently edited Docs, because editor revisions may be merged.⁠⁵⁶ A Docs API write can carry requiredRevisionId and is refused with 400 if the document has changed since. A revision ID is valid for 24 hours and for one user.⁠⁷⁴

When it fails

A long document will not export
Exported content is limited to 10 MB, and an export cannot be downloaded in parts.⁠¹⁸ Split a very long document before it comes into scope.
Captures fail with 403 or 429
Drive returns 403 or 429 for quota errors and advises exponential backoff.⁠⁹ Retry the capture with exponential backoff.

Check one record

Capture one Doc in Seal and note its Drive version and modifiedTime. Edit the Doc and capture it again: the second capture should have a higher version and the change, while the first still shows the text as it was.

3Start with the job.

Tell us what Neil needs to do and which records it needs. We’ll confirm the interface, permissions and implementation scope with your team.

Discuss this connection →

4Before it goes live.

Access and any write-back

Define which records are in scope and whose permissions apply. Whether the connection writes back at all is a separate decision, with its own mapping and approval.

Verification and release

Review the configured connection for its intended use. Keep the requirements, checks and evidence with the change, and approve the release through your team’s controls.

Read the assurance detail →

References

  1. 1Drive API: files.export.
  2. 2Drive API: export MIME types.
  3. 3Drive API: files resource.
  4. 4Docs API: documents.
  5. 5Drive API: manage revisions.
  6. 6Drive API: changes and revisions overview.
  7. 7Docs API: documents.batchUpdate.
  8. 8Drive API: download and export files.
  9. 9Drive API: usage limits.