Skip to content

Commit

Permalink
replace with sheet id
Browse files Browse the repository at this point in the history
  • Loading branch information
mythilytm committed Jul 23, 2024
1 parent af99b21 commit 31506c6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions update_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def main():
try:
# Load credentials from the environment variable
credentials_json = os.getenv('GOOGLE_SHEETS_CREDENTIALS')
if not credentials_json:
sheet_id = os.getenv('GOOGLE_SHEET_ID')
if not credentials_json or not sheet_id:
raise ValueError("No credentials found in environment variable.")

credentials_data = json.loads(credentials_json)
Expand All @@ -28,7 +29,7 @@ def main():
print("Google Sheets client authorized successfully.")

# Open the Google Sheet by name'
sheet = client.open_by_key("1UccoRr51TiQR6tUsq3SrNsP9FVm0tMfhdWX7VvHXkbQ").worksheet("DeploymentMatrix")
sheet = client.open_by_key(sheet_id).worksheet("DeploymentMatrix")
print("Google Sheet opened successfully.")

new_row_data = ["Data1", "Data2", "Data3"]
Expand Down

0 comments on commit 31506c6

Please sign in to comment.