Skip to main content

Add Heading

Adds a heading to a Google Docs document.

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

If the ContinueOnError property is true, no error is caught when the project is executed, even if a Catch node is used.

Inputs

  • Document Id - The ID of the Google Docs document to add a heading to.
  • Text - The text content for the heading.
  • Font Size - The font size for the heading text.
  • Font Name - The font family for the heading text. Default is "Times New Roman".

Options

  • Heading - The type of heading to add. Options are:
    • TITLE
    • SUBTITLE
    • HEADING 1
    • HEADING 2
    • HEADING 3
    • HEADING 4
    • HEADING 5
    • HEADING 6
  • Align - The alignment of the heading text. Options are:
    • Left (START)
    • Center (CENTER)
    • Right (END)
    • Justify (JUSTIFIED)
  • Bold - Whether to make the heading text bold. Default is false.
  • Italic - Whether to make the heading text italic. Default is false.
  • Underline - Whether to underline the heading text. Default is false.

How It Works

The Add Heading node integrates with Google Docs to add a heading to a document. When executed, the node:

  1. Validates the provided inputs (Document Id, Text, Font Size, Font Name)
  2. Connects to the specified Google Docs document
  3. Inserts the specified text at the end of the document
  4. Applies the specified heading style to the text
  5. Applies additional formatting options (font, size, alignment, styling)

Requirements

  • A valid Google Docs document ID
  • Valid Google Docs credentials
  • Text content for the heading
  • Valid font size value
  • Valid Google Docs permissions to modify the document

Error Handling

The node will return specific errors in the following cases:

  • Empty or invalid Document Id
  • Empty or invalid Text content
  • Empty or invalid Font Size
  • Google Docs service errors
  • Insufficient permissions to modify the document

Usage Notes

  • The Document Id can be found in the URL of the Google Docs document
  • The Heading option determines the hierarchical level and styling of the heading
  • The Align option controls how the heading text is positioned within the document
  • Styling options (Bold, Italic, Underline) can be combined with the heading style
  • The heading will be added at the end of the current document content