Lark Sheets icon

Lark Sheets

Lark Sheets Management

Overview

This node interacts with Lark Sheets to move rows or columns within a specified sheet. It allows users to reorder data by specifying the source range (rows or columns) and the destination index where these should be moved. This is useful for automating spreadsheet organization, such as rearranging data sets, prioritizing information, or cleaning up sheets programmatically.

Practical examples:

  • Moving a block of rows to a new position after sorting data externally.
  • Shifting columns to reorganize the layout of a sheet based on user input or workflow logic.
  • Automating report formatting by repositioning sections dynamically.

Properties

Name Meaning
Authentication Method of authenticating API requests: either "Tenant Token" or "OAuth2".
Spreadsheet Token The unique token identifying the target spreadsheet.
Sheet Id Identifier of the specific sheet within the spreadsheet where rows or columns will be moved.
Destination Index The zero-based index indicating the new position where the selected rows or columns will be moved to.
Source Defines the range to move, including:
- start_index: Starting index of rows/columns to move (zero-based).
- end_index: Ending index of rows/columns to move (exclusive).
- major_dimension: Specifies whether the operation targets "ROWS" or "COLUMNS".
Custom Body Allows sending a fully custom JSON body for the request instead of using the standard parameters.
Options > Use Custom Body Boolean flag to toggle between using the standard parameters or a custom JSON body for the request.

Output

The node outputs JSON data representing the result of the move operation. Typically, this includes confirmation of the action or updated metadata about the sheet's structure after moving rows or columns.

If binary data were involved (not indicated here), it would represent file contents or attachments, but this node focuses on JSON responses from the Lark Sheets API.

Dependencies

  • Requires access to the Lark Suite API with appropriate authentication via either a tenant token or OAuth2 credentials.
  • Needs configuration of credentials in n8n for authentication.
  • Network connectivity to https://open.larksuite.com/open-apis is required.

Troubleshooting

  • Invalid or missing tokens: Ensure that the spreadsheet token and sheet ID are correct and correspond to accessible resources.
  • Authentication errors: Verify that the chosen authentication method is properly configured and authorized.
  • Index out of bounds: The start_index, end_index, and destination_index must be within valid ranges of the sheet dimensions; otherwise, the API may return errors.
  • Incorrect major dimension: The major_dimension must be either "ROWS" or "COLUMNS"; any other value will cause the request to fail.
  • Custom Body usage: When using the custom body option, ensure the JSON structure matches the API specification exactly to avoid malformed request errors.

Links and References

Discussion