Guidance for Google Docs connector

Read the following information for guidance and best practices when using the Google Docs connector in your flows.

Supported scopes

The following OAuth scopes must be enabled in your Google Docs environment:

  • https://www.googleapis.com/auth/documents
  • https://www.googleapis.com/auth/drive.metadata.readonly
  • https://www.googleapis.com/auth/drive.file

Action card or event card-specific limitations

Update User action card

Review the additional information for each field.

Field Details
Insert Inline Image After selecting this option, exceeding the height and width of a page can cause a new Google Doc page to be appended.

Text

Inserting a newline character implicitly creates a paragraph at that index. The paragraph style of the new paragraph will be copied from the paragraph at the current insertion index, including lists and bullets.

Text styles for inserted text are determined automatically, generally preserving the styling of neighboring text. Generally, the text style for the inserted text matches the text immediately before the insertion index.

Some control characters (U+0000-U+0008, U+000C-U+001F) and characters from the Unicode Basic Multilingual Plane Private Use Area (U+E000-U+F8FF) are stripped out of the inserted text.

Segment ID

Use the Read Document card to obtain the Segment ID value.

Usage:

  • A slash (/) with a character is considered 1 character.

  • Segment ID and Index: Inserts the text to the specified segment (header, footer, footnotes) starting from the index.

  • Segment ID: Inserts the text to the end of the document body.

  • Index: Inserts the text to the specified index of the document body.

For the document body use index values in the startIndex and endIndex properties. They represent the index of the first character in the line and the last character respectively. The start and end indexes can be retrieved using the Read Document card. For the specific segment(header, footer, footnotes) use the endIndex as the length of the line. So the starting index always will be 0.

Index

For the document body use index values in the Start Index and End Index properties. They represent the index of the first character in the line and the last character respectively. The Start and End indexes can be retrieved using the Read Document card. For the specific segment (header, footer, footnotes) use the End Index as the length of the line. The starting index is always 0.

Usage:

  • A slash (/) with a character is considered 1 character.

  • Segment ID and Index: Inserts the text to the specified segment (header, footer, footnotes) starting from the index.

  • Segment ID: Inserts the text to the end of the document body.

  • Index: Inserts the text to the specified index of the document body.

Font Weight

The font weight makes up just one component of the rendered font weight. The rendered weight is determined by a combination of the weight and the text style's resolved bold value, after accounting for inheritance.

  • If the text is bold and the weight is less than 400, the rendered weight is 400.
  • If the text is bold and the weight is greater than or equal to 400 but is less than 700, the rendered weight is 700.
  • If the weight is greater than or equal to 700, the rendered weight is equal to the weight.
  • If the text isn't bold, the rendered weight is equal to the weight.

The Font Weight should be passed with the Font Family value. An error will be thrown if only one value is passed.

Image Height If height isn't specified, then a default size of the image is calculated based on its resolution. If one dimension is specified, then the other dimension is calculated to preserve the aspect ratio of the image. If both width and height are specified, the image is scaled to fit within the provided dimensions while maintaining its aspect ratio.
Image Width If width isn't specified, then a default size of the image is calculated based on its resolution. If one dimension is specified, then the other dimension is calculated to preserve the aspect ratio of the image. If both width and height are specified, the image is scaled to fit within the provided dimensions while maintaining its aspect ratio.

Read Document action card

Review the additional information for each field.

Field Details
Suggestions View Mode
  • Default: Suggestions View Mode applied to the returned document depends on the user's current access level. If the user only has view access, PREVIEW_WITHOUT_SUGGESTIONS is applied. Otherwise, SUGGESTIONS_INLINE is applied. This is the default suggestions view mode.

  • Inline: Returned document has suggestions inline. Suggested changes are differentiated from base content within the document. Requests to retrieve a document using this mode returns a 403 error if the user doesn't have permission to view suggested changes.

  • Accepted: Returned document is a preview with all suggested changes accepted. Requests to retrieve a document using this mode returns a 403 error if the user doesn't have permission to view suggested changes.

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

Related topics

Google Docs connector

Workflow elements

Guidance for Google Docs connector

Google Docs API Documentation