-
Notifications
You must be signed in to change notification settings - Fork 44.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat(server): Add Google Sheets Integration #7521
base: master
Are you sure you want to change the base?
Conversation
Update customnode.css and layout.tsx for Google Sign-In integration This commit adds styles to customnode.css to accommodate the Google Sign-In button. It also updates layout.tsx to wrap the entire application in the GoogleOAuthProvider component, enabling Google Sign-In functionality.
✅ Deploy Preview for auto-gpt-docs canceled.
|
This commit renames the `GoogleSheetsBlock` class to `GoogleSheetsReader` in the `google-sheets-block.py` file. The purpose of this change is to provide a more accurate and descriptive name for the block, reflecting its role as a reader for Google Sheets data.
This commit adds the `NEXT_PUBLIC_GOOGLE_CLIENT_ID` variable to the `.env.example` file in the `autogpt_builder` directory. The purpose of this change is to provide a placeholder for the Google client ID that will be used for authentication in the application.
This commit adds the GoogleSheetsWriter block to the google-sheets-block.py file. The purpose of this change is to provide a block that allows writing data to a specified Google Sheet. The block takes inputs such as the spreadsheet ID, sheet name, row data, and access token, and appends the data as a single row to the specified sheet. The result of the append operation is returned as the output of the block.
…gn-In button The CustomNode component in CustomNode.tsx has been updated to conditionally show the Google Sign-In button based on the block type. Previously, the button was only shown for the 'GoogleSheetsBlock' type, but now it will be shown for any block type that includes 'Google' in its name. This change improves the flexibility and usability of the component.
The GoogleSignInButton component in GoogleSignInButton.tsx has been updated to use the correct Google Sheets scope for authentication. Previously, it was using 'https://www.googleapis.com/auth/spreadsheets.readonly', but now it uses 'https://www.googleapis.com/auth/spreadsheets'. This change ensures that the component has the necessary permissions to interact with Google Sheets.
yield "data", {"error": "No data found."} | ||
else: | ||
data = [row for row in values[0:]] | ||
yield "rows", data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could yield one row at a time similar to the csv one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What CSV one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had opened a pr for a csv reader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
result = sheet.values().get(spreadsheetId=input_data.spreadsheet_id, range=input_data.range).execute() | ||
values = result.get("values", []) | ||
|
||
if not values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably yield error, message
This change allows the user to specify a single row to be read from a spreadsheet, rather than reading the entire thing or a specified range.
Previously, the user would have to manually extract and input their speadsheet ID from the URL. This change makes it so that the user just has to input the URL.
I can't for the life of me get test mocking to work on a block like this. @majdyz, can you show me how? |
…hub.com/Significant-Gravitas/AutoGPT into toran/open-1531-add-google-sheets-block
This pull request has conflicts with the base branch, please resolve those so we can evaluate the pull request. |
Will fix up this PR and merge it once we have finished implementing initial OAuth support. |
This change adds a Google Sheets Integration using a OAuth2 Google Sign-in flow.|
This is a primitive implementation for now, with the authorisation token living purely on the block itself and not being saved elsewhere in the backend, but it works!
Nice to haves / Future: