Create Form
This node allows you to create a new form using the provided title, description, and queue. Optionally, you can also specify a color and a logo URL.
For more detailed information, watch the following YouTube video:
How It Works
- The node validates required inputs: Form Name, Queue Name, and Form UI schema must not be empty
- RSA credentials are retrieved from the specified vault to encrypt submitted form data
- The Form UI JSON is processed, replacing any Mustache template variables (
{{variable}}) with values from the message - A theme configuration (color and logo URL) is added to the form UI structure
- The complete form data is sent to the Robomotion Forms API via
/v1/forms.createendpoint - If creation succeeds, the new Form ID is extracted from the API response
- The Form ID is assigned to the configured output variable and the message passes through
- If creation fails, an error is raised with details from the API response
Requirements
- A valid queue must exist with the specified Queue Name
- RSA Key Pair credentials must be configured in a vault (for encrypting form submissions)
- Credentials vault and item must be selected (not "_")
- The Form UI must be valid JSON matching the expected schema/ui_schema format
- Form Name and Queue Name cannot be empty
- The Form UI field cannot be empty
Error Handling
| Error Code | Description | Cause |
|---|---|---|
Core.Forms.Create.ErrOnCreate | Config parse error | Invalid node configuration during creation |
Core.Forms.Create.ErrOnMessage | Message parse error | Invalid message format received |
Core.Forms.Create.EmptyField (Form Name) | Form Name empty | Form Name input is blank or missing |
Core.Forms.Create.EmptyField (Queue Name) | Queue Name empty | Queue Name input is blank or missing |
Core.Forms.Create.EmptyField (Form UI) | Form UI empty | Form field is blank or missing |
Core.Forms.Create.ErrCredentials | Credentials error | Invalid credentials, vault/item not selected, or RSA key pair not found |
Core.Forms.Create.ErrParse | JSON parse error | Form UI JSON is malformed or invalid |
Core.Forms.Create.Err | Creation failed | API request failed or returned an error message |
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 Name - The title of the form to create.
- Description - The description of the form to create.
- Queue Name - The name of the queue in which the submitted data be kept encrypted.
- Form - A JSON schema representing the form properties and layout.
e.g.
{
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"surname": {
"type": "string"
},
"birthDate": {
"type": "string",
"format": "date"
},
"gender": {
"type": "string",
"enum": [
"Male",
"Female"
]
}
}
},
"ui_schema": {
"type": "VerticalLayout",
"elements": [{
"type": "Control",
"scope": "#/properties/name"
},
{
"type": "Control",
"scope": "#/properties/surname"
},
{
"type": "Control",
"scope": "#/properties/birthDate"
},
{
"type": "Control",
"scope": "#/properties/gender"
}
]
}
}
Output
- Form ID - The ID of the newly created form.
Options
- Credentials - RSA Keys to be used for the encryption of submitted data.
- Color - The color to use for the form.
- Logo URL - The URL of the logo to use for the form.
Usage Examples
Example 1: Create Simple Contact Form
Set Variable (formUI = {
"schema": { "type": "object", "properties": {
"fullName": {"type": "string"},
"email": {"type": "string", "format": "email"},
"message": {"type": "string"}
}},
"ui_schema": { "type": "VerticalLayout", "elements": [
{"type": "Control", "scope": "#/properties/fullName"},
{"type": "Control", "scope": "#/properties/email"},
{"type": "Control", "scope": "#/properties/message"}
]}
})
└─ Create Form
├─ Form Name: "Contact Form"
├─ Description: "Customer contact form"
├─ Queue Name: "contact-submissions"
├─ Form: formUI
├─ Credentials: RSA Key Pair from vault
└─ Output: msg.newFormID
└─ Log ("Form created with ID: " + msg.newFormID)
Create a basic contact form and store the generated Form ID.
Example 2: Dynamic Form with Template Variables
Set Variables:
- msg.companyName = "Acme Corp"
- msg.formColor = "#FF5722"
- msg.logoURL = "https://example.com/logo.png"
└─ Create Form
├─ Form Name: "{{companyName}} Registration"
├─ Description: "Registration form for {{companyName}}"
├─ Queue Name: "registrations"
├─ Form: (UI with {{companyName}} references)
├─ Color: "{{formColor}}"
├─ Logo URL: "{{logoURL}}"
└─ Output: msg.formID
Use Mustache templates to dynamically customize form content from message variables.
Example 3: Create Survey Form with Branching
Create Form
├─ Form Name: "Customer Satisfaction Survey"
├─ Description: "Quarterly feedback survey"
├─ Queue Name: "survey-responses"
├─ Form: (Complex UI with conditional fields)
├─ Credentials: Survey RSA Keys
└─ Output: msg.surveyFormID
└─ Update Form (add additional logic)
└─ Send Email (with form link)
Create a form and immediately update or share it via email.
Usage Notes
- The Form UI supports Mustache-style template variables:
{{variableName}} - Template variables are replaced with values from the incoming message object
- String variables in templates keep quotes, non-string variables (numbers, objects) have quotes removed
- The queue specified in Queue Name must already exist in your Robomotion workspace
- Form data submitted through the created form will be encrypted using the RSA public key
- Only RSA Key Pair credential types are accepted - other credential types will fail
- The generated Form ID is unique and can be used with other Form nodes (Update, Delete, Get Instance)
- Form schemas follow the JSON Schema specification format
Tips
- Store RSA Key Pairs in a dedicated vault for forms to keep credentials organized
- Use descriptive Queue Names that reflect the form's purpose (e.g., "contact-forms", "survey-responses")
- Validate your Form UI JSON in a JSON validator before using it in automation
- Save the Form ID to a global variable if you need to reference it in other flows
- Use template variables to create reusable form templates that can be customized per execution
- Set meaningful descriptions - they help users understand the form's purpose
- Add branding with Color and Logo URL options to match your organization's identity
- Test form creation in development before deploying to production
Related Nodes
- Update Form - Modify an existing form's properties
- Delete Form - Remove a form
- Create Form Instance - Generate a unique form submission link
- Get Form Instance - Retrieve submitted form data
- List Forms - Get all forms in the workspace