Portal Community
Irreversible operation. Deleting a sheet tab permanently removes all data on that tab. The API provides no undo mechanism. Recovery is only possible via the spreadsheet's Google Sheets revision history (accessible to the file owner for up to 30 days via File → Version history). Do not automate this operation without explicit safeguards: a confirmation check, an environment guard (ALLOW_DELETE=true), or a manual approval node in the workflow.

When to Use

Configuration

FieldRequiredDescription
CredentialIdRequiredInteger ID referencing a stored Google credential in the BizFirst Credentials Manager.
SpreadsheetIdRequiredThe Google Sheets spreadsheet ID from the URL.
SheetNameRequiredExact name of the tab to delete. Case-sensitive. The tab must exist — if it does not, the node routes to the error port with SHEET_NOT_FOUND.

Validation Errors

Error CodeCause
VAL_MISSING_SPREADSHEET_IDSpreadsheetId is empty or whitespace.
VAL_MISSING_SHEET_NAMESheetName is empty or whitespace.
SHEET_NOT_FOUNDNo tab with the specified SheetName exists in the spreadsheet. Check for typos and case sensitivity.
LAST_SHEET_ERRORThe specified tab is the only remaining tab in the spreadsheet. Google Sheets requires at least one tab to exist — the last tab cannot be deleted. Use spreadsheet/delete to delete the entire file instead.
VAL_INVALID_CREDENTIALCredentialId does not resolve to a valid Google credential with Edit permission.

Output Fields

FieldTypeDescription
sheetIdintegerThe internal numeric ID of the tab that was deleted. Useful for audit logging.
deletedbooleantrue when the tab was successfully deleted.
spreadsheetIdstringEchoed spreadsheet ID.
statusstring"success".
resourcestringAlways "sheet".
operationstringAlways "delete".

Sample Configuration

{
  "resource": "sheet",
  "operation": "delete",
  "CredentialId": 12,
  "SpreadsheetId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
  "SheetName": "Staging — Feb 2026"
}

Sample Output

{
  "sheetId": 1847392041,
  "deleted": true,
  "spreadsheetId": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgVE2upms",
  "status": "success",
  "resource": "sheet",
  "operation": "delete"
}

Expression Reference

Assuming this node is named deleteStaging in the workflow:

ExpressionReturnsDescription
{{ $output.deleteStaging.deleted }}booleantrue when the tab was successfully deleted.
{{ $output.deleteStaging.sheetId }}integerInternal sheet ID of the deleted tab — log this for audit trail.
{{ $output.deleteStaging.spreadsheetId }}stringSpreadsheet ID — useful for chaining to a subsequent operation on the same file.
{{ $output.deleteStaging.status }}string"success" when completed without error.

Node Policies & GuardRails

Workflow Examples

Example 1 — Archive Then Delete Quarterly Report Tab

// Trigger: Scheduled — first day of each quarter
// Node 1 — sheet/get (readOldTab): read all rows from "Q4 2025"
{
  "resource": "sheet", "operation": "get",
  "CredentialId": 12,
  "SpreadsheetId": "{{ $env.REPORTS_SHEET_ID }}",
  "SheetName": "Q4 2025"
}

// Node 2 — sheet/append (archiveRows): write rows to archive spreadsheet
{
  "resource": "sheet", "operation": "append",
  "CredentialId": 12,
  "SpreadsheetId": "{{ $env.ARCHIVE_SHEET_ID }}",
  "SheetName": "Q4 2025",
  "DataMode": "AutoMap"
}

// Node 3 — sheet/delete (deleteOldTab): remove tab only after archive confirmed
{
  "resource": "sheet", "operation": "delete",
  "CredentialId": 12,
  "SpreadsheetId": "{{ $env.REPORTS_SHEET_ID }}",
  "SheetName": "Q4 2025"
}

Example 2 — Pipeline Staging Cleanup

// Final node in a data enrichment pipeline
// Only runs after all downstream write operations have confirmed success
{
  "resource": "sheet", "operation": "delete",
  "CredentialId": 15,
  "SpreadsheetId": "{{ $env.PIPELINE_SHEET_ID }}",
  "SheetName": "{{ $json.stagingTabName }}"
}
// stagingTabName was set dynamically when the staging tab was created
// at the start of the pipeline run