From 69ac593440ed9cb320ffcd7d10b2c2c75dceb819 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 29 Sep 2020 15:12:24 -0700 Subject: [PATCH] Set the name of newly-created sheets to match the channel name Much better than having dozens of sheets all named "untitled". --- turbot/sheets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/turbot/sheets.py b/turbot/sheets.py index 50c4722..3d52735 100644 --- a/turbot/sheets.py +++ b/turbot/sheets.py @@ -35,7 +35,11 @@ def sheets_create(name): service = build('sheets', 'v4', credentials=creds) # Create a new sheet - spreadsheet_body = {} + spreadsheet_body = { + 'properties': { + 'title': name + } + } request = service.spreadsheets().create(body=spreadsheet_body) response = request.execute() -- 2.43.0