Feat/jotform
Added https://jotform.com as a tool and trigger/block integration. This enables workflows to:
- Trigger on form submissions via webhook (multipart/form-data)
- Retrieve form submissions using the Jotform API
- Get form details and metadata
- List all forms in the account
Key implementation details:
- Uses API Key authentication (Jotform doesn't support OAuth)
- Added multipart/form-data parsing to webhook processor to handle Jotform's webhook format
- Webhook trigger exposes form data at webhook.data.payload with dynamic field IDs (e.g., q2_q2_fullname0, q3_q3_email1)
- Supports both block mode (API tools) and trigger mode (webhooks)
Type of Change
- New feature
Testing
How has this been tested?
- ✅ Tested webhook trigger end-to-end with live Jotform submissions via ngrok tunnel
- ✅ Verified multipart/form-data parsing correctly extracts form field values
- ✅ Confirmed webhook registration and deployment workflow
- ✅ Tested form data access in subsequent blocks (e.g., Gmail integration)
- ✅ Verified all three Jotform tools are registered and accessible in UI
What should reviewers focus on?
- Webhook processor changes (lib/webhooks/processor.ts:79-102) - added multipart/form-data parsing
- Trigger output structure (triggers/jotform/webhook.ts) - using nested paths like webhook.data.payload.* to match webhook data structure
- API Key authentication - verify no OAuth credentials are referenced
- Form field access pattern - dynamic field IDs require accessing via webhook.data.payload.q{N}_{name}{index} format
Checklist
- Code follows project style guidelines
- Self-reviewed my changes
- Tests added/updated and passing (webhook integration tested manually, unit tests TBD)
- No new warnings introduced
- I confirm that I have read and agree to the terms outlined in the ./CONTRIBUTING.md#contributor-license-agreement-cla
Screenshots/Videos
1.
@Shubhamxshah is attempting to deploy a commit to the Sim Team on Vercel.
A member of the Team first needs to authorize it.
Greptile Summary
Added comprehensive Jotform integration supporting both webhook triggers and API-based operations.
Key Changes:
-
Webhook Support: Added
multipart/form-dataparsing to webhook processor (processor.ts:79-102) to handle Jotform's webhook format, with fallback for bothrawRequestfield and direct form field extraction -
Three API Tools: Implemented
submissions,get_form, andlist_formstools for retrieving form data via Jotform API -
API Key Authentication: All tools correctly use
visibility: 'user-only'for API key parameters, following custom instruction 2851870a (user-provided credentials should use user-only, not hidden) -
Webhook Trigger: Created webhook trigger with proper output structure using
webhook.data.payload.*for accessing form fields with dynamic IDs (e.g.,q3_q3_email1) - Registry Integration: Properly registered in blocks, tools, and triggers registries with Jotform brand icon
Technical Implementation:
- Tools use GET requests with API key in query string following Jotform's API conventions
- Webhook processor enhancement is backward-compatible, only activating for
multipart/form-datacontent type - Block configuration supports both trigger mode (webhooks) and block mode (API operations) with conditional field visibility
- Network policy change (adding custom egress rules support) is unrelated to Jotform but included in same commit
Testing Confirmed: Per PR description, end-to-end webhook testing was completed with live Jotform submissions via ngrok tunnel, and all three API tools are verified accessible in UI.
Confidence Score: 5/5
- This PR is safe to merge with minimal risk
- Implementation follows established patterns consistently across the codebase, uses proper authentication visibility (user-only for API keys per custom instructions), includes comprehensive error handling in webhook processor, and has been thoroughly tested end-to-end per PR description. The multipart/form-data parsing is backward-compatible and only activates for the specific content type.
- No files require special attention
Important Files Changed
| Filename | Overview |
|---|---|
| apps/sim/lib/webhooks/processor.ts | Added multipart/form-data parsing support for Jotform webhooks, handles both rawRequest field and direct form field extraction with proper error handling |
| apps/sim/triggers/jotform/webhook.ts | New webhook trigger configuration for Jotform with proper setup instructions and webhook.data.payload output structure |
| apps/sim/tools/jotform/submissions.ts | Implements form submissions retrieval via Jotform API with pagination, filtering, and proper API key authentication using user-only visibility |
| apps/sim/blocks/blocks/jotform.ts | Complete block configuration supporting three operations (submissions, get form, list forms) and webhook trigger integration |
Sequence Diagram
sequenceDiagram
participant User as User (Jotform)
participant Jotform as Jotform Service
participant Webhook as Webhook Endpoint
participant Processor as Webhook Processor
participant Parser as multipart/form-data Parser
participant DB as Database
participant Queue as Task Queue
participant Executor as Workflow Executor
User->>Jotform: Submit form
Jotform->>Webhook: POST /api/webhooks/{path}<br/>(multipart/form-data)
Webhook->>Processor: parseWebhookBody()
Processor->>Parser: Parse Content-Type: multipart/form-data
alt Has rawRequest field
Parser->>Parser: JSON.parse(rawRequest)
else Direct form fields
Parser->>Parser: Convert FormData to object
end
Parser-->>Processor: Return parsed body
Processor->>DB: Find webhook by path
DB-->>Processor: Return webhook + workflow config
Processor->>Processor: checkWebhookPreprocessing()<br/>(rate limits, deployment)
Processor->>Queue: Queue webhook execution
Queue-->>Webhook: Return 200 OK
Queue->>Executor: Execute workflow with webhook.data.payload
Executor->>Executor: Access form fields<br/>(e.g., webhook.data.payload.q3_email1)
Greptile found no issues!
From now on, if a review finishes and we haven't found any issues, we will not post anything, but you can confirm that we reviewed your changes in the status check section.
This feature can be toggled off in your Code Review Settings by deselecting "Create a status check for each PR".
@waleedlatif1 @icecrasher321 @emir-karabeg please review this.