Repository navigation
feat(sources): connect Gmail from the connection dialog, with Connect with Google - #420
Merged
Merged
Conversation
… with Google Add connection › Gmail connects the account through the same consent flow as Google Calendar (#407): Google asks to read mail (all of Gmail for IMAP), the account's address becomes the source's user, and its labels open. A Workspace service account takes its key and the address it acts for, and says which client id and scope an admin must allow. A Gmail row whose sign-in stopped working offers Connect Google account. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzqrXPCMR7aJYyLPqmx41Q
…e's wording Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzqrXPCMR7aJYyLPqmx41Q
Merged
16 of 22 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Adeel · project thread
Description
Before: a Gmail source (#405) could be added only through the API, by pasting a Google account's authorized user JSON or a service account key. Add connection had no Gmail option.
After: Add connection › Gmail offers Google account or Service account, as Google Calendar does.
userand its labels open, ready to pick one to watch. Pasting an authorized user JSON still works under the fold.A Gmail row whose sign-in stopped working shows Connect Google account.
How: Gmail joins the one consent flow that Google Calendar brought in #407.
gmail.SCOPES(params)names the scopes andACCOUNT = "user"names the parameter that gets the address;google_auth._modulefinds gmail too. The form's Google account block now serves both types.Motivation and Context
Second half of Adeel's request for Gmail and Google Workspace as a sensor, by OAuth or service account, over the API or IMAP. #405 shipped the source. This PR is the one-click OAuth and the dialog.
Steps to reproduce (if appropriate):
Types of changes
!in the title)Checklist:
test_connecting_the_account_in_the_browser: the consent asks for the right scopes, an unticked box leaves the source unconnected, the address becomesuser, and IMAP asks for all of Gmail;__tests__/add-connection.test.tsx: Gmail with Connect with Google, and a service account needs the address;__tests__/sources-model.test.ts: Gmail's validation and payload.docs/accordingly (docs/processing.md, Gmail and Google Workspace).## UnreleasedinCHANGELOG.md.Done questions (AGENTS.md)
token, or a key, through the API. The consent itself has to be a person in a browser (feat(sources): Connect with Google for Google Calendar connections #407's rule).via,userand the sign-in are edited in the form. Nothing is added to the setup wizard.google.tokenrow in the activity ledger.viastays api).make openapi).🤖 Generated with Claude Code
https://claude.ai/code/session_01WzqrXPCMR7aJYyLPqmx41Q
Generated by Claude Code