feat(jotform): add Jotform integration - #6772
Conversation
Adds 43 tools covering forms, questions, submissions, reports, webhooks,
labels, and account operations, plus the block, icon, and generated docs.
Request shapes are pinned against the API's own curl samples and the
official SDKs: PUT /form/{id}/properties and PUT /form/{id}/questions each
take a named envelope while PUT /form and the bulk-submission PUT take
their payload bare, and submission answers accept both the nested object
and the documented {qid}_{subfield} shorthand.
Skips the deprecated folder endpoints in favor of labels, and leaves out
endpoints whose response shape the docs do not publish.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryMedium Risk Overview The block exposes 43 operations mapped to Submission reads normalize answers into Also ships JotformIcon, docs ( Reviewed by Cursor Bugbot for commit eb76a55. Configure here. |
…JSON bodies Jotform quotes `responseCode` on some endpoints and not others, so a typeof-number test skipped the check on the quoted ones and turned an auth failure into a successful tool result with empty output. Also caps the raw body fallback, since an upstream gateway can answer with an HTML page instead of the documented envelope.
|
@cursor review |
Greptile SummaryThe PR adds a comprehensive Jotform integration with API-key and regional-host support, workflow block registration, generated metadata, documentation, and tests.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported duplicate-label and generated-key collision paths are addressed at the current head.
|
| Filename | Overview |
|---|---|
| apps/sim/tools/jotform/normalize.ts | Normalizes Jotform response entities and now preserves every rendered answer across duplicate, generated-key, and special-property label collisions. |
| apps/sim/tools/jotform/utils.ts | Implements regional API routing, request encoding, and Jotform envelope-aware error handling. |
| apps/sim/blocks/blocks/jotform.ts | Defines the Jotform workflow block’s operations, parameter mappings, credentials, and output contracts. |
| apps/sim/tools/jotform/jotform.test.ts | Covers request shapes, response errors, regional hosts, answer normalization, and adversarial label collisions. |
| apps/sim/tools/registry.ts | Registers the new Jotform tools for runtime dispatch. |
Reviews (4): Last reviewed commit: "fix(jotform): make the label-keyed answe..." | Re-trigger Greptile
Question labels are not unique — a form can carry two questions both labelled "Email" — so keying the derived `values` map on the label alone dropped all but the last and handed downstream workflows a confidently wrong answer. Every occurrence of a repeated label is now suffixed with its question ID, rather than only the later ones, so the result does not depend on answer order and a newly duplicated label reads as absent instead of as an arbitrary winner. The id-keyed `answers` record was already complete and is unchanged.
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 40e1923. Configure here.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit f9026cf. Configure here.
Question labels are free text, so the disambiguation key added in f9026cf was not itself safe: a question literally labelled "Email (3)" lands on the key generated for a duplicate "Email" at qid 3, dropping one of them. Any key already taken is now widened again until it is free. Accumulates in a Map rather than an object literal on the way out, since a question labelled `__proto__` assigned onto `{}` sets the prototype instead of an own property and disappears from the map entirely.
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit eb76a55. Configure here.
Summary
APIKEYheader, with a region selector (us/eu/hipaa) since a key is only valid on the host that issued itresponseCodeRequest shapes are pinned against the API's own curl samples and the official Node/PHP SDKs, since several are easy to get wrong and fail silently:
PUT /form/{id}/propertiesandPUT /form/{id}/questionseach take a named envelope;PUT /formand the bulk-submissionPUTtake their payload bare. Sending the wrong one returns 200 and changes nothing{qid}_{subfield}shorthand, withcreated_at/new/flagcontrol keys preserved wholeScope notes:
/system/plan/{planName}and/user/invoices: the docs publish no response sample for either, and I'd have been guessing field namesDELETE /label/{id}has no published response sample, so it reads only the envelope rather than inventing fieldsType of Change
Testing
Tested manually. 40 unit tests across the tools and block, covering the envelope shapes, the answer shorthand, region hosts, the 200-with-error-code envelope, label-tree nesting, and the block's param remapping. Verified each new assertion fails when its fix is reverted.
bun run lint,bun run check:audits(29 audits), andtype-checkall pass.Checklist