Skip to main content

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

operation 'read_values' required
Read values from a range
spreadsheet_id string required
Google Sheets spreadsheet ID
range string 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
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

write_values

operation 'write_values' required
Write values to a range
spreadsheet_id string required
Google Sheets spreadsheet ID
range string required
A1 notation range (e.g., "Sheet1!A1:B10")
values unknown[][] 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_response boolean
Include updated values in response
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

update_values

operation 'update_values' required
Update values in a specific range
spreadsheet_id string required
Google Sheets spreadsheet ID
range string required
A1 notation range (e.g., "Sheet1!A1:B10")
values unknown[][] 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_response boolean
Include updated values in response
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

append_values

operation 'append_values' required
Append values to the end of a table
spreadsheet_id string required
Google Sheets spreadsheet ID
range string required
A1 notation range to search for table (e.g., "Sheet1!A:A")
values unknown[][] 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_response boolean
Include appended values in response
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

clear_values

operation 'clear_values' required
Clear values from a range
spreadsheet_id string required
Google Sheets spreadsheet ID
range string required
A1 notation range (e.g., "Sheet1!A1:B10")
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

batch_read_values

operation 'batch_read_values' required
Read multiple ranges at once
spreadsheet_id string required
Google Sheets spreadsheet ID
ranges string[] 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
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

batch_update_values

operation 'batch_update_values' required
Update multiple ranges at once
spreadsheet_id string required
Google Sheets spreadsheet ID
value_ranges object[] required
Array of value ranges to update
value_input_option 'RAW' | 'USER_ENTERED'
How input data should be interpreted
include_values_in_response boolean
Include updated values in response
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

get_spreadsheet_info

operation 'get_spreadsheet_info' required
Get spreadsheet metadata and properties
spreadsheet_id string required
Google Sheets spreadsheet ID
include_grid_data boolean
Include grid data in response
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

create_spreadsheet

operation 'create_spreadsheet' required
Create a new spreadsheet
title string required
Title for the new spreadsheet
sheet_titles string[]
Titles for the initial sheets
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

add_sheet

operation 'add_sheet' required
Add a new sheet to spreadsheet
spreadsheet_id string required
Google Sheets spreadsheet ID
sheet_title string required
Title for the new sheet
row_count number
Number of rows in the new sheet
column_count number
Number of columns in the new sheet
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)

delete_sheet

operation 'delete_sheet' required
Delete a sheet from spreadsheet
spreadsheet_id string required
Google Sheets spreadsheet ID
sheet_id number required
ID of the sheet to delete
credentials Record<CredentialType,string>
Object mapping credential types to values (injected at runtime)