Following is the function signature to write data to Google Sheets:
Copy
write_sheet(data anyelement, -- see examples below options jsonb DEFAULT '{}');
Available options are:
Copy
{ "spreadsheet_id": "string", -- Optional. If not provided, a new spreadsheet is created "sheet_name": "string", -- Optional. Default is 'Sheet1' "header": "array" -- Optional. Default is []}
Here’s an example of writing data to a Google Sheet: