Google Sheets Bubble
Google Sheets integration for spreadsheet operations
Quick Start
import { GoogleSheetsBubble } from '@bubblelab/bubble-core';
import { CredentialType } from '@bubblelab/shared-schemas';
const result = await new GoogleSheetsBubble({
operation: 'read_values',
credentials: {
[CredentialType.GOOGLE_SHEETS_CRED]: process.env.GOOGLE_SHEETS_CRED as string,
},
}).action();
Operation Details
read_values
- Input Schema
- Output Schema
operation'read_values' required- Read values from a range
spreadsheet_idstring required- Google Sheets spreadsheet ID
rangestring required- A1 notation range (e.g., "Sheet1!A1:B10")
major_dimension'ROWS' | 'COLUMNS'- Major dimension for the values
value_render_option'FORMATTED_VALUE' | 'UNFORMATTED_VALUE' | 'FORMULA'- How values should be represented in the output
date_time_render_option'SERIAL_NUMBER' | 'FORMATTED_STRING'- How date/time values should be rendered
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'read_values' required- Read values from a range
successboolean required- Whether the operation was successful
rangestring- The range that was read
valuesunknown[][]- The values that were read
major_dimensionstring- Major dimension of the returned values
errorstring required- Error message if operation failed
write_values
- Input Schema
- Output Schema
operation'write_values' required- Write values to a range
spreadsheet_idstring required- Google Sheets spreadsheet ID
rangestring required- A1 notation range (e.g., "Sheet1!A1:B10")
valuesunknown[][] required- Data to write as array of arrays
major_dimension'ROWS' | 'COLUMNS'- Major dimension for the values
value_input_option'RAW' | 'USER_ENTERED'- How input data should be interpreted
include_values_in_responseboolean- Include updated values in response
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'write_values' required- Write values to a range
successboolean required- Whether the operation was successful
updated_rangestring- The range that was updated
updated_rowsnumber- Number of rows updated
updated_columnsnumber- Number of columns updated
updated_cellsnumber- Number of cells updated
updated_dataobject- Updated data if requested
errorstring required- Error message if operation failed
update_values
- Input Schema
- Output Schema
operation'update_values' required- Update values in a specific range
spreadsheet_idstring required- Google Sheets spreadsheet ID
rangestring required- A1 notation range (e.g., "Sheet1!A1:B10")
valuesunknown[][] required- Data to update as array of arrays
major_dimension'ROWS' | 'COLUMNS'- Major dimension for the values
value_input_option'RAW' | 'USER_ENTERED'- How input data should be interpreted
include_values_in_responseboolean- Include updated values in response
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'update_values' required- Update values in a specific range
successboolean required- Whether the operation was successful
updated_rangestring- The range that was updated
updated_rowsnumber- Number of rows updated
updated_columnsnumber- Number of columns updated
updated_cellsnumber- Number of cells updated
updated_dataobject- Updated data if requested
errorstring required- Error message if operation failed
append_values
- Input Schema
- Output Schema
operation'append_values' required- Append values to the end of a table
spreadsheet_idstring required- Google Sheets spreadsheet ID
rangestring required- A1 notation range to search for table (e.g., "Sheet1!A:A")
valuesunknown[][] required- Data to append as array of arrays
major_dimension'ROWS' | 'COLUMNS'- Major dimension for the values
value_input_option'RAW' | 'USER_ENTERED'- How input data should be interpreted
insert_data_option'OVERWRITE' | 'INSERT_ROWS'- How data should be inserted
include_values_in_responseboolean- Include appended values in response
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'append_values' required- Append values to the end of a table
successboolean required- Whether the operation was successful
table_rangestring- The table range values were appended to
updated_rangestring- The range that was updated
updated_rowsnumber- Number of rows updated
updated_columnsnumber- Number of columns updated
updated_cellsnumber- Number of cells updated
errorstring required- Error message if operation failed
clear_values
- Input Schema
- Output Schema
operation'clear_values' required- Clear values from a range
spreadsheet_idstring required- Google Sheets spreadsheet ID
rangestring required- A1 notation range (e.g., "Sheet1!A1:B10")
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'clear_values' required- Clear values from a range
successboolean required- Whether the operation was successful
cleared_rangestring- The range that was cleared
errorstring required- Error message if operation failed
batch_read_values
- Input Schema
- Output Schema
operation'batch_read_values' required- Read multiple ranges at once
spreadsheet_idstring required- Google Sheets spreadsheet ID
rangesstring[] required- Array of A1 notation ranges
major_dimension'ROWS' | 'COLUMNS'- Major dimension for the values
value_render_option'FORMATTED_VALUE' | 'UNFORMATTED_VALUE' | 'FORMULA'- How values should be represented in the output
date_time_render_option'SERIAL_NUMBER' | 'FORMATTED_STRING'- How date/time values should be rendered
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'batch_read_values' required- Read multiple ranges at once
successboolean required- Whether the operation was successful
value_rangesobject[]- Array of value ranges that were read
errorstring required- Error message if operation failed
batch_update_values
- Input Schema
- Output Schema
operation'batch_update_values' required- Update multiple ranges at once
spreadsheet_idstring required- Google Sheets spreadsheet ID
value_rangesobject[] required- Array of value ranges to update
value_input_option'RAW' | 'USER_ENTERED'- How input data should be interpreted
include_values_in_responseboolean- Include updated values in response
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'batch_update_values' required- Update multiple ranges at once
successboolean required- Whether the operation was successful
total_updated_rowsnumber- Total number of rows updated across all ranges
total_updated_columnsnumber- Total number of columns updated across all ranges
total_updated_cellsnumber- Total number of cells updated across all ranges
total_updated_sheetsnumber- Total number of sheets updated
responsesobject[]- Individual update responses
errorstring required- Error message if operation failed
get_spreadsheet_info
- Input Schema
- Output Schema
operation'get_spreadsheet_info' required- Get spreadsheet metadata and properties
spreadsheet_idstring required- Google Sheets spreadsheet ID
include_grid_databoolean- Include grid data in response
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'get_spreadsheet_info' required- Get spreadsheet metadata and properties
successboolean required- Whether the operation was successful
spreadsheetobject- Spreadsheet information
errorstring required- Error message if operation failed
create_spreadsheet
- Input Schema
- Output Schema
operation'create_spreadsheet' required- Create a new spreadsheet
titlestring required- Title for the new spreadsheet
sheet_titlesstring[]- Titles for the initial sheets
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'create_spreadsheet' required- Create a new spreadsheet
successboolean required- Whether the operation was successful
spreadsheetobject- Created spreadsheet information
errorstring required- Error message if operation failed
add_sheet
- Input Schema
- Output Schema
operation'add_sheet' required- Add a new sheet to spreadsheet
spreadsheet_idstring required- Google Sheets spreadsheet ID
sheet_titlestring required- Title for the new sheet
row_countnumber- Number of rows in the new sheet
column_countnumber- Number of columns in the new sheet
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'add_sheet' required- Add a new sheet to spreadsheet
successboolean required- Whether the operation was successful
sheet_idnumber- ID of the added sheet
sheet_titlestring- Title of the added sheet
errorstring required- Error message if operation failed
delete_sheet
- Input Schema
- Output Schema
operation'delete_sheet' required- Delete a sheet from spreadsheet
spreadsheet_idstring required- Google Sheets spreadsheet ID
sheet_idnumber required- ID of the sheet to delete
credentialsRecord<CredentialType,string>- Object mapping credential types to values (injected at runtime)
operation'delete_sheet' required- Delete a sheet from spreadsheet
successboolean required- Whether the operation was successful
deleted_sheet_idnumber- ID of the deleted sheet
errorstring required- Error message if operation failed