-
Notifications
You must be signed in to change notification settings - Fork 3.2k
feat(polling-groups): can invite multiple people to have their gmail/outlook inboxes connected to a workflow #2695
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
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR implements "polling groups" (credential sets) that allow multiple users to connect their Gmail/Outlook accounts to a single workflow trigger. The implementation creates a new database schema with three tables ( Key changes:
Architecture notes:
Confidence Score: 4/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Admin as Admin User
participant UI as Settings UI
participant API as Credential Sets API
participant DB as Database
participant Email as Email Service
participant Invitee as Invited User
participant OAuth as OAuth Provider
participant Webhook as Webhook Sync
Admin->>UI: Create Credential Set
UI->>API: POST /api/credential-sets
API->>DB: Insert credential_set
API-->>UI: Return credential set
Admin->>UI: Invite User to Set
UI->>API: POST /api/credential-sets/[id]/invite
API->>DB: Insert credential_set_invitation
API->>Email: Send invitation email
API-->>UI: Return invite URL
Invitee->>UI: Click invite link
UI->>API: GET /api/credential-sets/invite/[token]
API->>DB: Fetch invitation details
API-->>UI: Return invitation info
Invitee->>UI: Accept invitation
UI->>API: POST /api/credential-sets/invite/[token]
API->>DB: Start transaction
API->>DB: Insert credential_set_member
API->>DB: Update invitation status
API->>Webhook: syncAllWebhooksForCredentialSet
Webhook->>DB: Query existing webhooks
Webhook->>DB: Create webhook per credential
API->>DB: Commit transaction
API-->>UI: Return success + providerId
Invitee->>OAuth: Connect Gmail/Outlook
OAuth-->>Invitee: Return access token
Invitee->>DB: Store account credentials
Invitee->>Webhook: Trigger webhook sync
Webhook->>DB: Update webhook with credentialId
Webhook-->>Invitee: Webhooks configured
Note over Webhook,DB: Each member gets separate webhook<br/>for independent polling state
|
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.
49 files reviewed, 1 comment
…outlook inboxes connected to a workflow (#2695) * progress on cred sets * fix credential set system * return data to render credential set in block preview * progress * invite flow * simplify code * fix ui * fix tests * fix types * fix * fix icon for outlook * fix cred set name not showing up for owner * fix rendering of credential set name * fix outlook well known folder id resolution * fix perms for creating cred set * add to docs and simplify ui * consolidate webhook code better * fix tests * fix credential collab logic issue * fix ui * fix lint
Summary
Can invite people to connect gmail/outlook to credential groups. These can be used to poll hundreds of inboxes at once for a single workflow.
Fix trigger config changes detected
Remove provider specific code from route itself
Fix collab on credential selection
Fix UI/UX on different invite listings
Type of Change
Testing
Tested manually with @aadamgough
Checklist