Skip to main content

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:

  1. Delay Before - Waits for the specified delay before execution (if configured)
  2. 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
  3. Output Processing - If an output is specified:
    • Retrieves the output value from the input variable
    • Serializes the output to JSON format
  4. 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
  5. Response Transmission - Sends the response back through the application service websocket connection
  6. Flow Control - (Deprecated) Optionally stops the flow if the "Stop Flow" option is enabled
  7. 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 CodeDescriptionCommon Cause
Core.Application.AppOut.ErrOnCreateConfiguration parse errorInvalid node configuration or corrupted flow
Core.Application.AppOut.ErrOnMessageMessage parse errorInvalid input message format
Core.Application.AppOut.InvalidAppIDApplication ID not foundRunning outside of application context
Core.Application.AppOut.InvalidUIDUser ID not foundGlobal variable $AppUserID$ not set
Core.Application.AppOut.SessionNotFoundSession ID not foundSession expired or invalid
Core.Application.AppOut.InvalidOutputOutput serialization errorOutput cannot be converted to JSON
Core.Application.AppOut.ErrWriteWrite errorFailed 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

  1. Structured Response - Always return a structured JSON response with a status field
  2. Include Context - Include relevant context in the response (counts, timestamps, etc.)
  3. Error Handling - Use Catch nodes to send error responses via App Out
  4. Consistent Format - Keep response format consistent across your app for easier client-side handling
  5. Test Responses - Test your app to ensure the response format matches what the UI expects
  6. No Sensitive Data - Avoid including sensitive information in responses
  7. Use Variables - Build responses dynamically using variables from your automation
  8. Validation - Validate data before sending to ensure it's in the expected format
  • App In - For receiving the initial request
  • App Log - For sending progress logs before the final response
  • App Push - For sending intermediate updates
    • For stopping the flow (instead of deprecated Stop Flow option)