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
- Reporting — archive and remove old month tabs: At the end of each quarter, a workflow exports old monthly report tabs to a long-term archive spreadsheet, then deletes the source tabs to keep the active workbook manageable. The delete fires only after the archive write is confirmed successful.
- Operations — decommission project tabs: When a project is closed in the project management system, a workflow deletes the project's dedicated tracking tab from the "Active Projects" spreadsheet. Closed project data is exported to a separate archive spreadsheet first.
- HR — remove offboarded client tabs: When a client terminates their contract, a workflow deletes their private data tab from the client analytics spreadsheet, completing the data deletion required by privacy policy. This is gated by a manager-approval step in the workflow.
- Testing and QA: After an automated test run completes, a workflow deletes test-only tabs that were provisioned during setup, keeping the spreadsheet clean between test cycles.
- Staging sheet cleanup: A staging or scratch tab used as a data buffer during a multi-step pipeline is deleted after the pipeline completes and all results are committed to the production sheet.
Configuration
| Field | Required | Description |
CredentialId | Required | Integer ID referencing a stored Google credential in the BizFirst Credentials Manager. |
SpreadsheetId | Required | The Google Sheets spreadsheet ID from the URL. |
SheetName | Required | Exact 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 Code | Cause |
VAL_MISSING_SPREADSHEET_ID | SpreadsheetId is empty or whitespace. |
VAL_MISSING_SHEET_NAME | SheetName is empty or whitespace. |
SHEET_NOT_FOUND | No tab with the specified SheetName exists in the spreadsheet. Check for typos and case sensitivity. |
LAST_SHEET_ERROR | The 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_CREDENTIAL | CredentialId does not resolve to a valid Google credential with Edit permission. |
Output Fields
| Field | Type | Description |
sheetId | integer | The internal numeric ID of the tab that was deleted. Useful for audit logging. |
deleted | boolean | true when the tab was successfully deleted. |
spreadsheetId | string | Echoed spreadsheet ID. |
status | string | "success". |
resource | string | Always "sheet". |
operation | string | Always "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:
| Expression | Returns | Description |
{{ $output.deleteStaging.deleted }} | boolean | true when the tab was successfully deleted. |
{{ $output.deleteStaging.sheetId }} | integer | Internal sheet ID of the deleted tab — log this for audit trail. |
{{ $output.deleteStaging.spreadsheetId }} | string | Spreadsheet ID — useful for chaining to a subsequent operation on the same file. |
{{ $output.deleteStaging.status }} | string | "success" when completed without error. |
Node Policies & GuardRails
- Always export before deleting: In any workflow that deletes tabs containing user-generated or business-critical data, insert an archive step before the delete node. Use
sheet/get to read all rows, write them to an archive spreadsheet with sheet/append, and only then call sheet/delete in the next node.
- Environment guard: For workflows used in both staging and production environments, gate the delete node with an IF check:
{{ $env.ALLOW_DESTRUCTIVE_OPS == "true" }}. This prevents accidental deletes when the workflow is tested in a non-production context.
- Approval gate: For irreversible operations on business data, add a Human-in-the-Loop (HIL) approval node before
sheet/delete. The workflow pauses, notifies a manager, and only proceeds if approved.
- Last tab constraint: Google Sheets enforces a minimum of one tab per spreadsheet. Attempting to delete the last tab returns
LAST_SHEET_ERROR. If you need to remove all data and the file, use spreadsheet/delete instead.
- Error port handling: Always connect the error port of a
sheet/delete node to a logging or notification node. Silent failures on destructive operations are the most dangerous category of automation error.
- Quota: One write request per tab deletion.
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