Skip to main content

Delete Range

Deletes a specified range of content from 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 delete content from.
  • Start Index - The starting index of the content range to delete (must be >= 1).
  • End Index - The ending index of the content range to delete (must be >= 1).

How It Works

The Delete Range node integrates with Google Docs to remove a specified range of content from a document. When executed, the node:

  1. Validates the provided inputs (Document Id, Start Index, End Index)
  2. Connects to the specified Google Docs document
  3. Deletes the content between the specified start and end indices
  4. Updates the document with the deleted content

Requirements

  • A valid Google Docs document ID
  • Valid Google Docs credentials
  • Valid start and end indices (both must be >= 1)
  • 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
  • Start Index or End Index less than 1
  • 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
  • Index positions in Google Docs start at 1, not 0
  • The Start Index is inclusive, and the End Index is exclusive (content up to but not including the End Index will be deleted)
  • Index positions can be determined by analyzing the document structure or using other Google Docs nodes
  • Be careful when specifying indices to avoid accidentally deleting unintended content
  • The indices refer to character positions in the document, including special characters and formatting