Read Document

Read a document in Google Docs.

Input

Field Definition Type Required

Document

ID

Unique ID of the document.

Text

TRUE

Suggestions View Mode

Choose one of the following methods:

  • Default: The Suggestions View Mode applied to the returned document depends on the current user's view access level.

    If the user has view-only access, PREVIEW_WITHOUT_SUGGESTIONS is applied. Otherwise, SUGGESTIONS_INLINE is applied.

  • Inline: The returned document has suggestions inline. Suggested changes are differentiated from the original content within the document.

    If the user doesn't have permission to view suggested changes, then any request to retrieve a document using this mode returns a 403 error.

  • Accepted: The returned document is a preview with all suggested changes accepted.

    If the user doesn't have permission to view suggested changes, then any request to retrieve a document using this mode returns a 403 error.

  • Rejected: The returned document is a preview with all suggested changes rejected if there are any suggestions in the document.

Dropdown

FALSE

Output

Field Definition Type

Result

Document ID

Unique ID of the document.

Text

Title

Title of the document.

Text

Body

Content

Contents of the body.

List of Objects

Start Index

Zero-based start index of this structural element, in UTF-16 code units.

Number

End Index

Zero-based end index of this structural element, exclusive, in UTF-16 code units.

Number

Paragraph

Paragraph type of structural element.

Object

Section Break

Section break type of structural element.

Object

Table

Table type of structural element.

Object

Table of Contents

Table of contents type of structural element.

Object

Headers

Headers in the document, keyed by header ID.

Text

Footers

Footers in the document, keyed by header ID.

Text

Footnotes

Footnotes in the document, keyed by footnote ID.

Text

Document Style

Background

Background color of the document.

Object

Default Header ID

ID of the default header. If this isn't set, there's no default header.

Text

Default Footer ID

ID of the default footer. If this isn't set, there's no default footer.

Text

Even Page Header ID

ID of the header that is used only for even pages.

The value of Use Even Page Header Footer? determines whether to use the Default Header ID or this value for the header on even pages.

If Use Even Page Header Footer? isn't set, there's no even-page header.

Text

Event Page Footer ID

ID of the footer that is used only for even pages.

The value of Use Even Page Header Footer? determines whether to use the Default Footer ID or this value for the footer on even pages.

If Use Even Page Header Footer? isn't set, there's no even-page footer.

Text

First Page Header ID

ID of the header that is used only for the first page.

If this value isn't set, then a unique header for the first page doesn't exist.

The value of Use First Page Header Footer? determines whether to use the Default Header ID or this value for the header on the first page.

If Use First Page Header Footer? isn't set, there's no first-page header.

Text

First Page Footer ID

ID of the footer that is used only for the first page. If this value isn't set, then a unique footer for the first page doesn't exist.

The value of Use First Page Header Footer? determines whether to use the Default Footer ID or this value for the footer on the first page.

If Use First Page Header Footer? isn't set, there's no first-page footer.

Text

Use First Page Header Footer?

If the value is True, then there's a first page header or footer ID for the first page.

Otherwise, False.

True/False

Use Even Page Header Footer?

If the value is True, then there's an even page header or footer ID for the even pages.

Otherwise, False.

True/False

Page Number Start

Page number from which to start counting the number of pages.

Number

Margin Top

Top page margin.

Updating the top page margin on the document style clears the top page margin on all section styles.

Object

Margin Bottom

Bottom page margin.

Updating the bottom page margin on the document style clears the bottom page margin on all section styles.

Object

Margin Right

Right page margin.

Updating the right page margin on the document style clears the right page margin on all section styles. It may also cause columns to resize in all sections.

Object

Margin Left

Left page margin.

Updating the left page margin on the document style clears the left page margin on all section styles. It may also cause columns to resize in all sections.

Object

Page Size

Size of a page in the document.

Object

Margin Header

The amount of space between the top of the page and the contents of the header.

Object

Margin Footer

Amount of space between the bottom of the page and the contents of the footer.

Object

User Custom Header Footer Margins?

True if one of the following options is respected:

  • DocumentStyle marginHeader
  • SectionStyle marginHeader
  • DocumentStyle marginFooter
  • SectionStyle marginFooter

False when the default values in the docs editor for header and footer margin are used.

True/False

Suggested Document Style Changes

Suggested changes to the style of the document, keyed by suggestion ID.

Object

Named Styles

Named styles of the document.

Object

Suggested Named Styles Changes

Suggested changes to the named styles of the document, keyed by suggestion ID.

Object

Lists

Lists in the document, keyed by list ID.

Object

Named Ranges

Named ranges in the document, keyed by name.

Object

Revision ID

Revision ID of the document.

This value can be used in update requests to specify which revision of a document to apply updates to, and, if the document has been edited since that revision, how the request should behave.

Text

Suggestions View Mode

Suggestions view mode applied to the document.

Text

Inline Objects

Inline objects in the document, keyed by object ID.

Object

Positioned Objects

Positioned objects in the document, keyed by object ID.

Object

Related topics

Google Docs connector

Cards in flows

Google Docs API Documentation