Skip to main content

Update Form

Updates a form with the provided properties.

How It Works

  1. The node validates that Form ID is provided and not empty
  2. Input values are retrieved for Form Name, Description, and Queue Name
  3. If credentials are provided and valid:
    • The RSA Key Pair is retrieved from the vault
    • The public key is extracted for form encryption
  4. If Form UI data is provided:
    • Mustache template variables ({{variable}}) are replaced with message values
    • The JSON is parsed and validated
  5. All form data (name, description, queue, public key, UI) is packaged into an update request
  6. The request is sent to the Robomotion Forms API at /v1/forms.update endpoint
  7. The form is updated with the new properties
  8. The message passes through unchanged

Requirements

  • A valid Form ID must be provided (form must exist)
  • If updating credentials, a valid RSA Key Pair must be selected from a vault
  • If updating Form UI, it must be valid JSON matching the expected schema/ui_schema format
  • All input fields can be updated individually or together

Error Handling

Error CodeDescriptionCause
Core.Forms.Update.ErrOnCreateConfig parse errorInvalid node configuration during creation
Core.Forms.Update.ErrOnMessageMessage parse errorInvalid message format received
Core.Forms.Update.EmptyFieldForm ID emptyForm ID input is blank or missing
Core.Forms.Update.ErrCredentialsCredentials errorInvalid credentials, vault/item not selected, or RSA key pair not found
Core.Forms.Update.ErrParseJSON parse errorForm UI JSON is malformed or invalid
Core.Forms.Update.ErrUpdate failedAPI request failed or form not found

Common Properties

  • Name - The custom name of the node.
  • Color - The custom color of the node.
  • Delay Before (sec) - Waits in seconds before executing the node.
  • Delay After (sec) - Waits in seconds after executing node.
  • Continue On Error - Automation will continue regardless of any error. The default value is false.
info

if ContinueOnError property is true, no error is caught when the project is executed even if Catch node is used.

Input

  • Form Id - ID of the form to update. This ID is generated by the Create Form node.
  • Form Name - New title of the form
  • Description - New description of the form
  • Queue Name - The queue name of the form
  • Form - Form data to update (JSON schema/UI)

Output

  • Form ID - ID of the updated form (same as input ID)

Options

  • Credentials - RSA Keys to be used for the encryption of submitted data (optional - leave unselected to keep existing credentials).

Usage Examples

Example 1: Update Form Title and Description

List Forms → find form by name
└─ Update Form
├─ Form ID: msg.targetForm.id
├─ Form Name: "Contact Form - Updated"
├─ Description: "Updated contact form with new fields"
└─ Queue Name: msg.targetForm.queueName (keep existing)
└─ Log "Form updated successfully"

Update the name and description of an existing form.

Example 2: Update Form UI Schema

Set Variable (newFormUI = { updated schema... })
└─ Update Form
├─ Form ID: "form-abc-123"
├─ Form Name: (leave blank to keep existing)
├─ Description: (leave blank to keep existing)
├─ Queue Name: (leave blank to keep existing)
└─ Form: newFormUI
└─ Log "Form UI updated"

Update only the form's UI schema while keeping other properties unchanged.

Example 3: Rotate RSA Encryption Keys

Update Form
├─ Form ID: msg.formID
├─ Form Name: (keep existing)
├─ Description: (keep existing)
├─ Queue Name: (keep existing)
├─ Form: (keep existing)
└─ Credentials: New RSA Key Pair from vault
└─ Log "Encryption keys rotated for enhanced security"

Update the RSA encryption keys used for form submissions.

Usage Notes

  • Updating a form does not affect existing form instances - they retain their original configuration
  • Only fields with non-empty values are updated; blank fields preserve existing values
  • The Form UI supports Mustache-style template variables: {{variableName}}
  • Updating credentials changes the encryption key for future submissions only (past submissions remain encrypted with old key)
  • Form instances created before the update will continue to use the original form configuration
  • The update operation is atomic - either all changes succeed or none are applied

Tips

  • To update only specific fields, leave other input fields empty/blank
  • Test form UI updates in development before applying to production forms
  • When rotating encryption keys, ensure you have backups of old private keys for accessing historical data
  • Use List Forms to find the Form ID if you don't have it stored
  • Consider version control for form schemas - store UI configurations before updating
  • Update form descriptions to include version numbers or change logs
  • Schedule periodic form updates to refresh branding or add new fields