Modules@robinpath/jotform
jotform

@robinpath/jotform

0.1.1Node.jsPublic

JotForm 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.listForms to perform this operation
  • getForm -- Use jotform.getForm to perform this operation
  • getFormQuestions -- Use jotform.getFormQuestions to perform this operation
  • listSubmissions -- Use jotform.listSubmissions to perform this operation
  • getSubmission -- Use jotform.getSubmission to perform this operation

Quick Reference

FunctionDescriptionReturns
setCredentialsConfigure jotform credentials.object
listFormslistFormsobject
getFormgetFormobject
getFormQuestionsgetFormQuestionsobject
listSubmissionslistSubmissionsobject
getSubmissiongetSubmissionobject
createSubmissioncreateSubmissionobject
deleteSubmissiondeleteSubmissionobject
getFormReportsgetFormReportsobject
getFormFilesgetFormFilesobject
listFolderslistFoldersobject
getUsergetUserobject
getUsagegetUsageobject
getFormWebhooksgetFormWebhooksobject
createFormWebhookcreateFormWebhookobject

Functions

setCredentials

Configure jotform credentials.

Module: jotform | Returns: object -- API response.

jotform.setCredentials
ParameterTypeRequiredDescription
apiKeystringYesapiKey

listForms

listForms

Module: jotform | Returns: object -- API response.

jotform.listForms
ParameterTypeRequiredDescription
inputstringNoInput parameter

getForm

getForm

Module: jotform | Returns: object -- API response.

jotform.getForm
ParameterTypeRequiredDescription
inputstringNoInput parameter

getFormQuestions

getFormQuestions

Module: jotform | Returns: object -- API response.

jotform.getFormQuestions
ParameterTypeRequiredDescription
inputstringNoInput parameter

listSubmissions

listSubmissions

Module: jotform | Returns: object -- API response.

jotform.listSubmissions
ParameterTypeRequiredDescription
inputstringNoInput parameter

getSubmission

getSubmission

Module: jotform | Returns: object -- API response.

jotform.getSubmission
ParameterTypeRequiredDescription
inputstringNoInput parameter

createSubmission

createSubmission

Module: jotform | Returns: object -- API response.

jotform.createSubmission
ParameterTypeRequiredDescription
inputstringNoInput parameter

deleteSubmission

deleteSubmission

Module: jotform | Returns: object -- API response.

jotform.deleteSubmission
ParameterTypeRequiredDescription
inputstringNoInput parameter

getFormReports

getFormReports

Module: jotform | Returns: object -- API response.

jotform.getFormReports
ParameterTypeRequiredDescription
inputstringNoInput parameter

getFormFiles

getFormFiles

Module: jotform | Returns: object -- API response.

jotform.getFormFiles
ParameterTypeRequiredDescription
inputstringNoInput parameter

listFolders

listFolders

Module: jotform | Returns: object -- API response.

jotform.listFolders
ParameterTypeRequiredDescription
inputstringNoInput parameter

getUser

getUser

Module: jotform | Returns: object -- API response.

jotform.getUser
ParameterTypeRequiredDescription
inputstringNoInput parameter

getUsage

getUsage

Module: jotform | Returns: object -- API response.

jotform.getUsage
ParameterTypeRequiredDescription
inputstringNoInput parameter

getFormWebhooks

getFormWebhooks

Module: jotform | Returns: object -- API response.

jotform.getFormWebhooks
ParameterTypeRequiredDescription
inputstringNoInput parameter

createFormWebhook

createFormWebhook

Module: jotform | Returns: object -- API response.

jotform.createFormWebhook
ParameterTypeRequiredDescription
inputstringNoInput parameter

Error Handling

All functions throw on failure. Common errors:

ErrorCause
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)

VersionTagPublished
0.1.1latest1 months ago
Install
$ robinpath add @robinpath/jotform

Collaborators

Dumitru Balaban
Dumitru Balaban
@dumitru
View all @robinpath modules
Version0.1.1
LicenseMIT
Unpacked Size4.3 KB
Versions1
Weekly Downloads26
Total Downloads26
Stars0
Last Publish1 months ago
Created1 months ago

Category

utilities