feat(tools): added webflow OAuth + tools#1720
Merged
waleedlatif1 merged 7 commits intostagingfrom Oct 23, 2025
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
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
siteIdparameter 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
transformResponsefunctions that could cause runtime errors on API failures, (2) an unusedsiteIdparameter 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
| Filename | Score | Overview |
|---|---|---|
| apps/sim/lib/auth.ts | 4/5 | Added Webflow OAuth provider configuration with token introspection endpoint for user authentication |
| apps/sim/tools/webflow/types.ts | 4/5 | Defined TypeScript interfaces for all Webflow operations, includes unused siteId in base params |
| apps/sim/tools/webflow/create_item.ts | 3/5 | Implements CMS item creation, missing error handling for API failures |
| apps/sim/tools/webflow/update_item.ts | 3/5 | Implements CMS item updates via PATCH, missing error handling for API failures |
| apps/sim/tools/webflow/delete_item.ts | 4/5 | Implements CMS item deletion with proper 204 status handling, includes unused siteId parameter |
| apps/sim/tools/webflow/get_item.ts | 3/5 | Retrieves 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
16 files reviewed, 6 comments
added 2 commits
October 23, 2025 09:55
This was referenced Oct 23, 2025
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)
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.
Summary
Fixes #1699
Type of Change
Testing
Tested manually.
Checklist