Skip to content

Copy/Remove Sheet Activity

The Copy/Remove Sheet activity manages sheets within a Google Sheets document. It enables users to either duplicate a specified sheet within the same document or to a different one, or to delete a sheet entirely. This activity provides essential functionality for structuring and maintaining Google Sheets documents.

Field Description Requirement
Google Sheet Name The reference name of the Google Sheet document that has already been opened or created. Required
Source Google Sheet Instance Name The instance name of the source Google Sheet document when copying a sheet between different documents. For example: ${myGoogleSheet}. Optional
Sheet Name The name of the specific sheet (page or tab) within the spreadsheet to be copied or removed. If not provided, the activity defaults to the first sheet. Optional
Action Specifies whether to Copy or Remove the sheet. Required
New Sheet Name The name for the new sheet when the Copy action is selected. This field is ignored for the Remove action. Optional

Action Types & Examples

Copy Action

  • Format: String
  • Example Result: "Copy"

Remove Action

  • Format: String
  • Example Result: "Remove"

Implementation Examples

Field Setup - Google Sheet Name: MySpreadsheet - Action: Copy - Sheet Name: OriginalData - New Sheet Name: BackupData

Execution Parameters - To copy a sheet within the same document: - googleSheetName: "MySpreadsheet" - action: "Copy" - sheetName: "MonthlyReport" - newSheetName: "MonthlyReport_Archive" - To remove a sheet: - googleSheetName: "MySpreadsheet" - action: "Remove" - sheetName: "TemporaryCalculations" - To copy a sheet from a source document to a target document: - googleSheetName: "TargetSpreadsheet" - sourceGoogleSheetInstanceName: "${sourceSheetInstance}" - action: "Copy" - sheetName: "DataToTransfer" - newSheetName: "ImportedData"

Technical Notes

  • Ensure that the specified Google Sheet Name refers to an existing and accessible Google Sheet document.
  • When copying a sheet, if New Sheet Name is not provided, the activity typically appends a copy number (e.g., "Sheet1 (copy)") to the original sheet name.
  • Deleting a sheet is a permanent action and cannot be undone through this activity. Exercise caution when using the Remove action.
  • The activity requires appropriate permissions to access and modify the Google Sheets document. Ensure the connected Google account has editor access.
  • If Sheet Name is not found, the activity will typically throw an error, unless a default behavior is explicitly defined for that scenario.