Skip to content

feat(jotform): add Jotform integration - #6772

Merged
waleedlatif1 merged 4 commits into
stagingfrom
feat/jotform-integration
Aug 17, 2026
Merged

feat(jotform): add Jotform integration#6772
waleedlatif1 merged 4 commits into
stagingfrom
feat/jotform-integration

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Summary

  • Adds the Jotform integration: 43 tools across forms, questions, submissions, reports, webhooks, labels, and account operations, plus the block, icon, and generated docs
  • Submissions come back keyed by question ID and re-keyed by question label, so a response is usable without a second lookup
  • API-key auth via the APIKEY header, with a region selector (us / eu / hipaa) since a key is only valid on the host that issued it
  • Errors are read from the body, not just the status: Jotform reports many failures as HTTP 200 with a non-2xx responseCode

Request 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}/properties and PUT /form/{id}/questions each take a named envelope; PUT /form and the bulk-submission PUT take their payload bare. Sending the wrong one returns 200 and changes nothing
  • Submission answers accept both the nested object and the documented {qid}_{subfield} shorthand, with created_at/new/flag control keys preserved whole

Scope notes:

  • Skips the folder endpoints, which Jotform deprecated in favor of labels — labels are implemented instead
  • Leaves out /system/plan/{planName} and /user/invoices: the docs publish no response sample for either, and I'd have been guessing field names
  • DELETE /label/{id} has no published response sample, so it reads only the envelope rather than inventing fields

Type of Change

  • New feature (non-breaking change which adds functionality)

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), and type-check all pass.

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)

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.
@vercel

vercel Bot commented Aug 17, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Aug 17, 2026 6:06am

Request Review

@cursor

cursor Bot commented Aug 17, 2026

Copy link
Copy Markdown

PR Summary

Medium Risk
New third-party API surface with create/update/delete on forms, submissions, webhooks, and account settings; risk is moderated by isolated new code and extensive tests around request shapes and response parsing.

Overview
Adds a Jotform workflow integration so agents can work with forms, submissions, reports, webhooks, labels, and account metadata via API key auth, with a US / EU / HIPAA region selector.

The block exposes 43 operations mapped to jotform_* tools. SubBlock fields that clash across operations (e.g. newFormQuestions vs bulkQuestions) are renamed in the block params mapper so stale UI values do not leak into unrelated calls.

Submission reads normalize answers into values keyed by question label (with disambiguation when labels repeat or collide with generated keys), while preserving id-keyed answers. The tool layer handles Jotform-specific wire formats: APIKEY header, form-urlencoded submission bodies, envelope vs bare PUT payloads, shorthand qid_subfield answers, and failures returned as HTTP 200 with a non-2xx responseCode.

Also ships JotformIcon, docs (jotform.mdx), integrations.json metadata, block registry wiring, workflow templates/skills, and unit tests for tools and block param mapping.

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.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@greptile-apps

greptile-apps Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR adds a comprehensive Jotform integration with API-key and regional-host support, workflow block registration, generated metadata, documentation, and tests.

  • Adds tools for forms, questions, submissions, reports, webhooks, labels, and account operations.
  • Normalizes submission answers into both question-ID-keyed and collision-safe label-keyed records.
  • Handles Jotform’s body-level error envelopes and region-specific API hosts.

Confidence Score: 5/5

The 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.

Important Files Changed

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

Comment thread apps/sim/tools/jotform/normalize.ts Outdated
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.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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.

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

Comment thread apps/sim/tools/jotform/normalize.ts Outdated
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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.

Comment thread apps/sim/tools/jotform/normalize.ts Outdated
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.
@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@greptile

@waleedlatif1

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ 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.

@waleedlatif1
waleedlatif1 merged commit 0844d41 into staging Aug 17, 2026
30 checks passed
@waleedlatif1
waleedlatif1 deleted the feat/jotform-integration branch August 17, 2026 06:13
Sign up for free to 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