-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Feat/pinterest #2627
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
base: staging
Are you sure you want to change the base?
Feat/pinterest #2627
Conversation
… fixes, subflow resize clamping
…ribe, auth checks, new db indexes
…dioai#2481) The realtime service network policy was missing the custom egress rules section that allows configuration of additional egress rules via values.yaml. This caused the realtime pods to be unable to connect to external databases (e.g., PostgreSQL on port 5432) when using external database configurations. The app network policy already had this section, but the realtime network policy was missing it, creating an inconsistency and preventing the realtime service from accessing external databases configured via networkPolicy.egress values. This fix adds the same custom egress rules template section to the realtime network policy, matching the app network policy behavior and allowing users to configure database connectivity via values.yaml.
…rovements, additional kb tag types
…ts, LLM providers standardization
|
@Shubhamxshah is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
|
@waleedlatif1 @icecrasher321 @emir-karabeg please review this |
Greptile SummaryThis PR adds a complete Pinterest integration enabling users to create pins on their Pinterest boards directly from workflows. The implementation follows established OAuth patterns in the codebase with proper token refresh support, board selection via dynamic selectors, and comprehensive error handling. Key Changes:
Implementation Quality:
Confidence Score: 5/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant User
participant UI as Workflow UI
participant Auth as OAuth Service
participant Pinterest as Pinterest API
participant DB as Database
participant Selector as Board Selector
participant Tool as Create Pin Tool
User->>UI: Configure Pinterest block
UI->>Auth: Start Pinterest OAuth
Auth->>Pinterest: OAuth handshake
Pinterest->>Auth: OAuth complete
Auth->>DB: Store OAuth info
Auth->>UI: Connected successfully
User->>UI: Open board selector
UI->>Selector: Request boards (credentialId, workflowId)
Selector->>Auth: Check access rights
Auth->>Selector: Approved
Selector->>Auth: Request API access
Auth->>Pinterest: Verify and update
Pinterest->>Auth: Ready for use
Selector->>Pinterest: GET /v5/boards
Pinterest->>Selector: List of boards
Selector->>UI: Show boards in dropdown
User->>UI: Create pin with details
UI->>Tool: pinterest_create_pin(board_id, title, media_url, etc)
Tool->>Auth: Request API access
Auth->>Tool: Ready for API call
Tool->>Pinterest: POST /v5/pins with data
Pinterest->>Tool: Pin created
Tool->>UI: Return pin_id, pin_url, success
|
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.
Additional Comments (1)
-
apps/sim/lib/oauth/oauth.ts, line 1084-1086 (link)logic: Pinterest provider missing from
getProviderAuthConfigfunction
18 files reviewed, 1 comment
|
@Shubhamxshah please rebase and acknowledge the comments |
Added Pinterest provider to getProviderAuthConfig() to enable automatic token refresh when access tokens expire. Without this, users would experience authentication failures after tokens expire. Configuration: - Token endpoint: https://api.pinterest.com/v5/oauth/token - Uses Basic Authentication (as per Pinterest OAuth spec) - Supports refresh token rotation This prevents authentication failures and ensures continuous Pinterest integration functionality.
|
@waleedlatif1 thanks for pointing out, i've fixed them. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Additional Comments (3)
-
apps/sim/lib/auth/auth.ts, line 1789-1797 (link)logic:
Date.now()generates a different ID each time, creating duplicate accounts on every failed auth attempt. Use a consistent identifier like the access token hash instead. -
apps/sim/lib/auth/auth.ts, line 1814-1822 (link)logic: Same issue:
Date.now()creates a new user ID each time, causing duplicate accounts. -
apps/sim/lib/auth/auth.ts, line 1804 (link)logic:
Date.now()fallback creates unstable user IDs. Sinceprofile.usernameandprofile.idshould always exist in successful responses, this fallback indicates a data issue that should be logged differently.
18 files reviewed, 3 comments
|
@waleedlatif1 please review. |
Summary
Adds Pinterest integration to enable creating pins on Pinterest boards directly from workflows. The integration includes OAuth authentication, dynamic board selection from authenticated accounts, and support for posting images with titles, descriptions, links, and alt text.
Changes:
Type of Change
Testing
Manual Testing Performed:
What reviewers should focus on:
Checklist
Screenshots/Videos