@robinpath/jotform
0.1.1Node.jsPublicJotForm module for RobinPath.
JotForm
JotForm module for RobinPath.
Package: @robinpath/jotform | Category: Utility | Type: Utility
Authentication
jotform.setCredentials "your-credentials"
Call this once at the start of your script before using any other function. Credentials persist for the duration of the script execution.
Use Cases
Use the jotform module when you need to:
- listForms -- Use
jotform.listFormsto perform this operation - getForm -- Use
jotform.getFormto perform this operation - getFormQuestions -- Use
jotform.getFormQuestionsto perform this operation - listSubmissions -- Use
jotform.listSubmissionsto perform this operation - getSubmission -- Use
jotform.getSubmissionto perform this operation
Quick Reference
| Function | Description | Returns |
|---|---|---|
setCredentials | Configure jotform credentials. | object |
listForms | listForms | object |
getForm | getForm | object |
getFormQuestions | getFormQuestions | object |
listSubmissions | listSubmissions | object |
getSubmission | getSubmission | object |
createSubmission | createSubmission | object |
deleteSubmission | deleteSubmission | object |
getFormReports | getFormReports | object |
getFormFiles | getFormFiles | object |
listFolders | listFolders | object |
getUser | getUser | object |
getUsage | getUsage | object |
getFormWebhooks | getFormWebhooks | object |
createFormWebhook | createFormWebhook | object |
Functions
setCredentials
Configure jotform credentials.
Module: jotform | Returns: object -- API response.
jotform.setCredentials
| Parameter | Type | Required | Description |
|---|---|---|---|
apiKey | string | Yes | apiKey |
listForms
listForms
Module: jotform | Returns: object -- API response.
jotform.listForms
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getForm
getForm
Module: jotform | Returns: object -- API response.
jotform.getForm
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getFormQuestions
getFormQuestions
Module: jotform | Returns: object -- API response.
jotform.getFormQuestions
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listSubmissions
listSubmissions
Module: jotform | Returns: object -- API response.
jotform.listSubmissions
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getSubmission
getSubmission
Module: jotform | Returns: object -- API response.
jotform.getSubmission
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createSubmission
createSubmission
Module: jotform | Returns: object -- API response.
jotform.createSubmission
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
deleteSubmission
deleteSubmission
Module: jotform | Returns: object -- API response.
jotform.deleteSubmission
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getFormReports
getFormReports
Module: jotform | Returns: object -- API response.
jotform.getFormReports
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getFormFiles
getFormFiles
Module: jotform | Returns: object -- API response.
jotform.getFormFiles
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
listFolders
listFolders
Module: jotform | Returns: object -- API response.
jotform.listFolders
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getUser
getUser
Module: jotform | Returns: object -- API response.
jotform.getUser
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getUsage
getUsage
Module: jotform | Returns: object -- API response.
jotform.getUsage
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
getFormWebhooks
getFormWebhooks
Module: jotform | Returns: object -- API response.
jotform.getFormWebhooks
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
createFormWebhook
createFormWebhook
Module: jotform | Returns: object -- API response.
jotform.createFormWebhook
| Parameter | Type | Required | Description |
|---|---|---|---|
input | string | No | Input parameter |
Error Handling
All functions throw on failure. Common errors:
| Error | Cause |
|---|---|
Jotform API error (${res.status}): ${t} | Check the error message for details |
jotform.setCredentials requires apiKey. | Check the error message for details |
jotform.deleteSubmission requires an ID. | Check the error message for details |
Jotform: "..." not configured. Call jotform.setCredentials first. | Check the error message for details |
@desc "List forms and validate result"
do
set $result as jotform.listForms
if $result != null
print "Success"
else
print "No result"
end
enddo
Recipes
1. List and iterate Forms
Retrieve all items and loop through them.
@desc "Setup authentication"
do
jotform.setCredentials $token
enddo
@desc "List forms and iterate results"
do
set $result as jotform.listForms
each $item in $result
print $item
end
enddo
2. Create a new item with createSubmission
Create a new resource and capture the result.
@desc "Setup authentication"
do
jotform.setCredentials $token
enddo
@desc "Create submission"
do
set $result as jotform.createSubmission
print "Created: " + $result
enddo
3. Check before creating
List existing items and only create if needed.
@desc "Setup authentication"
do
jotform.setCredentials $token
enddo
@desc "List forms and create submission"
do
set $existing as jotform.listForms
if $existing == null
jotform.createSubmission
print "Item created"
else
print "Item already exists"
end
enddo
4. Multi-step JotForm workflow
Chain multiple jotform operations together.
@desc "Setup authentication"
do
jotform.setCredentials $token
enddo
@desc "List forms, get form, and more"
do
set $r_listForms as jotform.listForms
set $r_getForm as jotform.getForm
set $r_getFormQuestions as jotform.getFormQuestions
print "All operations complete"
enddo
5. Safe listForms with validation
Check results before proceeding.
@desc "Setup authentication"
do
jotform.setCredentials $token
enddo
@desc "List forms and validate result"
do
set $result as jotform.listForms
if $result != null
print "Success: " + $result
else
print "Operation returned no data"
end
enddo
Related Modules
- json -- JSON module for complementary functionality
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.1 | latest | 1 months ago |
Related Modules
@robinpathv0.1.4
SMTP email sending and address parsing for RobinPath
hash
JS@robinpathv0.1.3
Cryptographic hashing utilities: MD5, SHA family, HMAC, CRC32, file hashing, UUID v5 generation, secure random bytes, and content fingerprinting
csv
JS@robinpathv0.1.2
Parse and stringify CSV data
apollo
JS@robinpathv0.1.2
Apollo module for RobinPath.
$ robinpath add @robinpath/jotform
