Skip to content

feat(tools): added webflow OAuth + tools - #1720

Merged
waleedlatif1 merged 7 commits into
stagingfrom
feat/webflow
Oct 23, 2025
Merged

feat(tools): added webflow OAuth + tools#1720
waleedlatif1 merged 7 commits into
stagingfrom
feat/webflow

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • added webflow OAuth + tools

Fixes#1699

Type of Change

  • New feature

Testing

Tested manually.

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

@vercel

vercelBot commented Oct 23, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentPreviewCommentsUpdated (UTC)
docsReadyReadyPreviewCommentOct 23, 2025 7:57pm

@greptile-appsgreptile-appsBot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Greptile Overview

Summary

This PR adds comprehensive Webflow CMS integration with OAuth authentication and five CRUD operations (list, get, create, update, delete items). The implementation follows the established patterns in the codebase for OAuth providers and tool definitions.

Key additions:

  • OAuth configuration for Webflow with token introspection endpoint in lib/auth.ts
  • Five tool implementations for CMS operations using Webflow v2 API
  • Block configuration with operation-based routing and JSON field data parsing
  • Complete documentation with API reference

Implementation notes:

  • All tools use Webflow API v2 endpoints (https://api.webflow.com/v2/collections/...)
  • OAuth flow requests scopes: sites:read, cms:read, cms:write
  • The siteId parameter is collected but not used in API requests (Webflow v2 collection endpoints don't require it in the URL)
  • Tools lack explicit error handling for failed API responses before calling response.json()
  • The file header comment was removed from blocks/registry.ts

Confidence Score: 4/5

  • This PR is generally safe to merge with minor improvements recommended for production robustness
  • The implementation correctly follows established patterns for OAuth providers and tool definitions. The OAuth flow is properly configured with token introspection, and all five CRUD operations use appropriate HTTP methods. However, the score is 4/5 rather than 5/5 due to: (1) missing error handling in transformResponse functions that could cause runtime errors on API failures, (2) an unused siteId parameter across all tools that adds unnecessary complexity, and (3) removal of a file header comment. These are non-critical issues that don't affect core functionality but should be addressed for production quality.
  • The Webflow tool files (create_item.ts, update_item.ts, get_item.ts, list_items.ts) need attention for error handling improvements before API responses are parsed

Important Files Changed

File Analysis

FilenameScoreOverview
apps/sim/lib/auth.ts4/5Added Webflow OAuth provider configuration with token introspection endpoint for user authentication
apps/sim/tools/webflow/types.ts4/5Defined TypeScript interfaces for all Webflow operations, includes unused siteId in base params
apps/sim/tools/webflow/create_item.ts3/5Implements CMS item creation, missing error handling for API failures
apps/sim/tools/webflow/update_item.ts3/5Implements CMS item updates via PATCH, missing error handling for API failures
apps/sim/tools/webflow/delete_item.ts4/5Implements CMS item deletion with proper 204 status handling, includes unused siteId parameter
apps/sim/tools/webflow/get_item.ts3/5Retrieves single CMS item by ID, missing error handling for API failures

Sequence Diagram

sequenceDiagram
participant User
participant SimApp as Sim Application
participant AuthServer as Better-Auth
participant Webflow as Webflow OAuth
participant WebflowAPI as Webflow API v2
User->>SimApp: Configure Webflow block
SimApp->>User: Request OAuth authorization
User->>AuthServer: Initiate OAuth flow
AuthServer->>Webflow: Authorization request<br/>(scopes: sites:read, cms:read, cms:write)
Webflow->>User: Login & authorize
User->>Webflow: Grant permissions
Webflow->>AuthServer: Authorization code
AuthServer->>Webflow: Exchange code for tokens
Webflow->>AuthServer: Access token + metadata
AuthServer->>Webflow: Introspect token<br/>(GET /v2/token/introspect)
Webflow->>AuthServer: User info (user_id, user_name)
AuthServer->>SimApp: Store credentials
SimApp->>User: OAuth complete
User->>SimApp: Execute Webflow operation<br/>(create/read/update/delete item)
SimApp->>WebflowAPI: API request with Bearer token<br/>(collectionId, itemId, fieldData)
WebflowAPI->>WebflowAPI: Validate token & permissions
WebflowAPI->>SimApp: Response data
SimApp->>User: Operation result
Loading

16 files reviewed, 6 comments

Edit Code Review Agent Settings | Greptile

Comment threadapps/sim/tools/webflow/create_item.ts
Comment threadapps/sim/tools/webflow/update_item.ts
Comment threadapps/sim/tools/webflow/get_item.ts
Comment threadapps/sim/tools/webflow/list_items.ts
Comment threadapps/sim/blocks/registry.ts
Comment threadapps/sim/tools/webflow/delete_item.ts Outdated
@waleedlatif1
waleedlatif1 merged commit a4e874b into stagingOct 23, 2025
14 of 15 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/webflow branch October 23, 2025 20:08
waleedlatif1 added a commit that referenced this pull request Oct 23, 2025
* fix(debug-mode): remove duplicate debug mode flag (#1714)
* feat(i18n): update translations (#1709)
* improvement(condition): added variable and envvar highlighting for condition input (#1718)
* fix(dashboard): add additional context for paginated logs in dashboard, add empty state when selected cell has no data (#1719)
* fix(dashboard): add additional context for paginated logs in dashboard, add empty state when selected cell has no data
* apps/sim
* renaming
* remove relative import
* feat(tools): added webflow OAuth + tools (#1720)
* feat(tools): added webflow OAuth + tools
* remove itemId from delete item
* remove siteId
* added webhook triggers + oauth scopes + site/collection selector
* update sample payload for webflow triggers
* cleanup
* fix discord color
* feat(i18n): update translations (#1721)
* improvement(schedule): fix UI bug with schedule modal (#1722)
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@waleedlatif1