App Out
This node sends a response back to the App In initiated request back to the running instance started from the Robomotion Apps.
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
- Output - Returned response to the instance. The response is a custom JSON object specific to the application.
Options
- Stop Flow - (Deprecated) Whether to stop the flow after sending output. This option is kept for backward compatibility only.
How It Works
The App Out node sends the final response back to the Robomotion App or Assistant that initiated the automation. The execution follows these steps:
- Delay Before - Waits for the specified delay before execution (if configured)
- Context Validation - Validates that the automation is running in an application context:
- Checks for
$AppID$global variable - Checks for
$AppUserID$global variable - Retrieves the session ID from the message
- Checks for
- Output Processing - If an output is specified:
- Retrieves the output value from the input variable
- Serializes the output to JSON format
- Message Creation - Creates a queue message containing:
- Message ID (from App In or newly generated)
- Application ID, User ID, Session ID
- Robot ID and version
- Encrypted payload
- Response Transmission - Sends the response back through the application service websocket connection
- Flow Control - (Deprecated) Optionally stops the flow if the "Stop Flow" option is enabled
- Delay After - Waits for the specified delay after execution (if configured)
The response appears in the Robomotion Apps UI or is returned to the Assistant chat.
Requirements
- Robomotion Deskbot - This node only works with Robomotion Deskbot
- Application Context - Must be running within a Robomotion App or Assistant session
- App In Node - Requires an App In node earlier in the flow to establish context
- Network Connection - Active connection to Robomotion service
Error Handling
| Error Code | Description | Common Cause |
|---|---|---|
Core.Application.AppOut.ErrOnCreate | Configuration parse error | Invalid node configuration or corrupted flow |
Core.Application.AppOut.ErrOnMessage | Message parse error | Invalid input message format |
Core.Application.AppOut.InvalidAppID | Application ID not found | Running outside of application context |
Core.Application.AppOut.InvalidUID | User ID not found | Global variable $AppUserID$ not set |
Core.Application.AppOut.SessionNotFound | Session ID not found | Session expired or invalid |
Core.Application.AppOut.InvalidOutput | Output serialization error | Output cannot be converted to JSON |
Core.Application.AppOut.ErrWrite | Write error | Failed to send response through websocket |
Usage Examples
Example 1: Return Simple Result
Return a simple success message:
Output: {
"status": "success",
"message": "Processing completed"
}
Example 2: Return Processed Data
Return extracted or processed data:
Output: {
"status": "success",
"data": {{processedRecords}},
"count": {{recordCount}}
}
Example 3: Return File Information
Return information about downloaded files:
Output: {
"files": {{fileList}},
"totalSize": {{totalSize}},
"downloadPath": {{downloadPath}}
}
Example 4: Error Response
Return an error response when something goes wrong:
Output: {
"status": "error",
"error": {{errorMessage}},
"code": {{errorCode}}
}
Use this in a Catch node to send error information back to the user.
Usage Notes
- JSON Format - The output must be a valid JSON object
- Encryption - The response is automatically encrypted before transmission
- Single Response - Each App In request should have one corresponding App Out response
- Empty Output - If no output variable is specified, the node completes without sending a response
- Stop Flow Deprecated - The "Stop Flow" option is deprecated; use Instance Stop node instead
- Variable Support - Output can include variables that are resolved before sending
Tips
- Structured Response - Always return a structured JSON response with a status field
- Include Context - Include relevant context in the response (counts, timestamps, etc.)
- Error Handling - Use Catch nodes to send error responses via App Out
- Consistent Format - Keep response format consistent across your app for easier client-side handling
- Test Responses - Test your app to ensure the response format matches what the UI expects
- No Sensitive Data - Avoid including sensitive information in responses
- Use Variables - Build responses dynamically using variables from your automation
- Validation - Validate data before sending to ensure it's in the expected format