Skip to content

Data Return

The Data Return node returns various types of data outputs from a workflow for use in downstream systems, user interfaces, or integrations.

Purpose

Use this node to define and return specific data types such as widgets, documents, files, JSON strings, or search results to consuming systems, user interfaces, or subsequent nodes requiring structured output.

Inputs

Field LabelInput TypeDescription
Return Object TypeTextSpecifies the type of object to return. Supported values are:
- Search Widget
- Document Action
- Search Results
- File Return
- Json Return
- AEC Model Ids.
Widget Html (conditional)TextRequired if Return Object Type is Search Widget. The HTML string for the widget.
Action Return (conditional)TextRequired if Return Object Type is Document Action. The action string to return.
Search Results (conditional)TextRequired if Return Object Type is Search Results. Must be a JSON array of searchResult objects.
Results (conditional)TextRequired if Return Object Type is File Return or Json Return. For File Return, this is the file path to return. For Json Return, this is the JSON string to return.
AEC Model Ids (conditional)TextRequired if Return Object Type is AEC Model Ids. The model IDs string to return.
Message Return (optional)TextA message to return alongside the data output for workflow logging or user feedback.

Outputs

Output VariableDescription
ReturnDataThe returned data object, whose type depends on Return Object Type.
DataReturnTypeA string indicating the type of data returned (e.g. widget, documentaction, searchresult, file, json).

Functionality

This node:

  1. Validates required inputs based on Return Object Type.
  2. Processes the input to generate return data, including:
    • Replacing placeholders using workflow data.
    • Verifying types and existence (e.g. for files).
  3. Sets ReturnData and DataReturnType in taskParameters.data for output to consuming systems.
  4. Returns an optional message specified in Message Return.

Supported Return Types

TypeDescription
Search WidgetReturns a string of widget HTML to embed in UI.
Document ActionReturns a string representing a document-related action.
Search ResultsReturns a list of searchResult objects for search-based outputs.
File ReturnReturns a file as a byte array read from the specified path.
Json ReturnReturns a JSON string result.
AEC Model IdsReturns model ID string data (usage context to be confirmed).

Example Use Case

✅ Return a generated search widget HTML to display results in a user dashboard.
✅ Return a file as bytes for direct download by users.
✅ Return structured JSON for consumption by an external API or next workflow node.
✅ Return search results for processing by reporting or display workflows.

Task Success Criteria

  • Success: The specified data is successfully returned with the correct type, and an optional message is set.
  • Failure: If required inputs are missing, types are invalid, or file paths do not exist, the task returns a descriptive error message indicating the failure point.

Notes

  • Ensure inputs match the expected types and data structures for each return type.
  • The ReturnData output is dynamically typed based on the selected Return Object Type.
  • This node acts as a final or intermediate data return within workflows to integrate with user interfaces, APIs, or external services.

Tentech 2024