Delete Form Instance
Deletes a form instance
How It Works
- The node validates that Form Instance ID is provided and not empty
- A delete request is sent to the Robomotion Forms API at
/v1/forms.instance.deleteendpoint - The API removes the specific form instance and its submitted data (if any)
- If deletion succeeds (response.OK = true), the message passes through unchanged
- If deletion fails, an error is raised with the API error message
Requirements
- A valid Form Instance ID must be provided
- The Form Instance ID must correspond to an existing instance
- User must have permissions to delete form instances
Error Handling
| Error Code | Description | Cause |
|---|---|---|
Core.Forms.DeleteInstance.ErrOnCreate | Config parse error | Invalid node configuration during creation |
Core.Forms.DeleteInstance.ErrOnMessage | Message parse error | Invalid message format received |
Core.Forms.DeleteInstance.EmptyField | Form ID empty | Form Instance ID input is blank or missing |
Core.Forms.DeleteInstance.Err | Deletion failed | API request failed or instance 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 the ContinueOnError property is true, no error is caught when the project is executed even if the Catch node is used.
Input
- Form Instance ID - The ID of the form instance to be deleted. This ID is generated by the Create Form Instance node.
Usage Examples
Example 1: Delete After Processing Submission
Get Form Instance (msg.instanceID) → msg.submittedData
└─ Process Submission Data
└─ Save to Database
└─ Delete Form Instance (msg.instanceID)
└─ Log "Instance deleted after processing"
Retrieve and process form data, then delete the instance to clean up.
Example 2: Revoke Disposable Form Links
Create Form Instance (Type: Disposable) → msg.instanceID, msg.formURL
└─ Send Email with Form URL
└─ Wait for Condition (user cancelled request)
└─ Delete Form Instance (msg.instanceID)
└─ Log "Form link revoked"
Delete a disposable form instance to revoke access before it's submitted.
Example 3: Batch Delete Submitted Instances
List Form Instances (formID) → msg.instances
└─ For Each (msg.instances)
├─ If (instance.status === "submitted")
│ └─ Get Form Instance (instance.id) → export data
│ └─ Delete Form Instance (instance.id)
│ └─ [Return to For Each]
└─ [Loop Complete]
Archive submitted instances by exporting data then deleting them.
Usage Notes
- WARNING: Deleting a form instance permanently removes its submitted data - this action is irreversible
- Unlike deleting a form (which removes all instances), this only deletes a specific instance
- The form template remains intact - only the instance is deleted
- Form URLs pointing to the deleted instance will return an error page
- Ensure submitted data is processed/backed up before deletion if needed
Tips
- Always retrieve and process form instance data before deletion if you need to preserve it
- Use this node to implement "one-time use" patterns for sensitive forms
- Delete submitted disposable instances promptly to prevent unauthorized access
- Set "Continue On Error" to true when batch deleting to avoid stopping on missing instances
- Consider implementing data retention policies that auto-delete old instances
- Use Get Form Instance before deletion to verify the instance exists and check its status
Related Nodes
- Create Form Instance - Create a new instance
- Get Form Instance - Retrieve instance data before deletion
- Delete Form - Delete the entire form (all instances)
- List Forms - View forms and their instances