L2 Construct: copy_spreadsheet
sheets googleDescription
Copies a spreadsheet to a new spreadsheet. It takes the source spreadsheet id and the new spreadsheet name as input.
L2 Data
- Provider: google
- Module: gsheets
- Action: copy_spreadsheet
Example Step
{
"name": "insert-your-step-name",
"type": "l2",
"l2_data": {
"provider": "google",
"module": "gsheets",
"action": "copy_spreadsheet",
"metadata": {}
}
}
Input
Example
{
"source_spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"new_spreadsheet_name": "New Spreadsheet"
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/google/gsheets/copy-spreadsheet-input",
"$ref": "#/$defs/CopySpreadsheetInput",
"$defs": {
"CopySpreadsheetInput": {
"properties": {
"source_spreadsheet_id": {
"type": "string"
},
"new_spreadsheet_name": {
"type": "string"
}
},
"additionalProperties": false,
"type": "object",
"required": ["source_spreadsheet_id", "new_spreadsheet_name"]
}
}
}
Output
Example
{
"spreadsheet_id": "1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms",
"spreadsheet_name": "New Spreadsheet",
"spreadsheet_url": "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/edit",
"error": {
"is_error": false
}
}
Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://pontus.bpa/pkgs/l2/google/gsheets/copy-spreadsheet-output",
"$ref": "#/$defs/CopySpreadsheetOutput",
"$defs": {
"CopySpreadsheetOutput": {
"properties": {
"spreadsheet_id": {
"type": "string"
},
"spreadsheet_name": {
"type": "string"
},
"spreadsheet_url": {
"type": "string"
},
"error": {
"$ref": "#/$defs/HandlerError"
}
},
"additionalProperties": false,
"type": "object",
"required": [
"spreadsheet_id",
"spreadsheet_name",
"spreadsheet_url",
"error"
]
},
"HandlerError": {
"properties": {
"is_error": {
"type": "boolean"
},
"errors": {
"items": {
"type": "string"
},
"type": "array"
}
},
"additionalProperties": false,
"type": "object",
"required": ["is_error"]
}
}
}