Skip to content

[ACTION] Google Sheets - Insert and Move Rows at Specific Positions #18937

@timfong888

Description

@timfong888

Is there a specific app this action is for?

Yes, this is for the Google Sheets app component: https://github.com/PipedreamHQ/pipedream/tree/master/components/google_sheets

Please provide a link to the relevant API docs for the specific service / operation.

This feature request adds row positioning capabilities from Google Sheets API v4:

Row Positioning API:

Add 2 new actions to support row positioning:

  1. google_sheets-insert-row-at-position - Insert blank row(s) at specific index
  2. google_sheets-move-rows - Move existing rows to different position

What is the user flow you want to achieve?

Enable structured data management workflows where rows need to be inserted at specific positions rather than always appending to the end.

Example: Adding a subtask under a parent task in a PM dashboard:

Row 7:  Parent Task
Row 8:  └─ Subtask 1
Row 9:  └─ Subtask 2
Row 10: [Insert new subtask here]

Current behavior: add-single-row appends to bottom (row 53)
Desired behavior: Insert at row 10 to maintain hierarchy

What specific actions are you interested in performing with the API?

Action 1: Insert Row at Position

API Endpoint: spreadsheets.batchUpdate with InsertDimensionRequest

Example:

{
  "requests": [{
    "insertDimension": {
      "range": {
        "sheetId": 0,
        "dimension": "ROWS",
        "startIndex": 10,
        "endIndex": 11
      },
      "inheritFromBefore": false
    }
  }]
}

Then populate with values using spreadsheets.values.update.

Action 2: Move Rows

API Endpoint: spreadsheets.batchUpdate with MoveDimensionRequest

Example:

{
  "requests": [{
    "moveDimension": {
      "source": {
        "sheetId": 0,
        "dimension": "ROWS",
        "startIndex": 52,
        "endIndex": 53
      },
      "destinationIndex": 10
    }
  }]
}

Props for Insert Row at Position:

Name Type Description
spreadsheetId string Spreadsheet identifier
sheetName string Sheet name (resolve to sheetId)
rowIndex integer Zero-based index where to insert
rowCount integer Number of rows to insert (default: 1)
values array Optional cell values to populate
inheritFromBefore boolean Inherit formatting from previous row

Props for Move Rows:

Name Type Description
spreadsheetId string Spreadsheet identifier
sheetName string Sheet name (resolve to sheetId)
sourceStartRow integer Zero-based start index (inclusive)
sourceEndRow integer Zero-based end index (exclusive)
destinationRow integer Zero-based destination index

Metadata

Metadata

Assignees

Labels

triagedFor maintainers: This issue has been triaged by a Pipedream employee

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions