loading...
No Results
  • Get Started
    • Welcome to GoInsight.AI
    • Quick Start
  • Knowledge 101
    • Key Concepts
    • Knowledge Base
    • LLM Selection Guide
    • Tool
    • Service
    • Data Security
  • Quick Chatbot
    • Build a Quick Bot
  • InsightFlow
    • InsightFlow Introduction
    • Types of InsightFlow
    • Node
      • Start
      • LLM
      • Knowledge Base Retrieval
      • Answer
      • Document Writing
      • Document Reading
      • HTTP Request
      • IF/ELSE
      • Question Classifier
      • Branch Aggregator
      • Multi branch Selector
      • Iteration
      • Auto-Continue
      • Template
      • Code
      • JSON Variable Extractor
      • Variable Assigner
      • Variable Extractor
      • KnowledgeFocus LLM
      • Agent
      • End
    • Publishing
      • Publishing an Interactive Flow
      • Publishing a Service Flow
      • Create Your First Workflow
  • Control & Management
    • Access Control
Home > Documentation > InsightFlow > Node

Variable Assigner Node

Definition

The 'Variable Assigner' node allows users to assign specific values to variables during the execution of a workflow. This enables the workflow to dynamically store and transfer data, facilitating data sharing and interaction between different nodes. The Variable Assigner node acts as a data container, storing user-specified data within the variable for use by subsequent nodes.

variable assigner node

Quick Start / How to Use

Detailed instructions for node configuration: In ChatInsight.AI, right-click and select "Add Node" to add a Template node to the workflow.

add variable assigner node

1. Configure the create variable parameters of the Variable Assigner Node

Click on the "Variable Assigner Node" and then click the "+" in the configuration panel on the right to configure the "Target Variable Mode," "Assigned Variable," "Write Mode," "Input Type," and "Input Value" for this Variable Assigner node.

variable create variable
  • Target Variable
    • This is used to select the method of operation on the variable, with two options: "Add New Variable" and "Import from existing variables." The former creates a new variable and assigns a value, while the latter allows reassigning a value to an existing variable.
    • Customer Service System: Create a new variable to record the user's name by selecting "Add New Variable"; update the previously recorded user name variable by selecting "Select Existing Variable."
    • variable create a new
    • variable import from existing
  • Assigned Variable
    • If "Add New Variable" is selected in the "Target Variable Mode," the "Assigned Variable" must include a "New Variable Name" (required) and the selection of a data type for the new variable. If "Select Existing Variable" is chosen in the "Target Variable Mode," the variable to be assigned must be selected from the "Assigned Variable" dropdown.

Tips and instructions for using data types preset by different systems when selecting "Add New Variable":

Data type Explanation Usage
String Stores text information, such as usernames or addresses. Set this type when text concatenation, retrieval, or formatting is needed to facilitate interaction with other text.
Number Stores integers or floating-point numbers, recording value data such as age and price. Specify this type for numerical calculations, statistical analysis, and range checking to ensure accurate operations.
Bool Boolean type, with only true or false, often used to represent logical outcomes. Useful for conditional branching control (e.g., if-else logic); setting this type clarifies flow direction.
Array[Bool] An array of boolean values, such as a collection of task completion statuses. Use this to track multiple logical states simultaneously and enable batch status checks.
Array[Number] An array of numbers, storing multiple numeric values such as prices or quantities. Handle bulk numerical data, such as calculating totals and averages; assigning a numeric array improves efficiency.
Array[Object] An array of objects, with each element being an object, storing complex data structures like user information. Manage a set of complex data objects, such as a collection of user profiles; assigning an object array facilitates unified operations.
Array[String] An array of strings, which can contain multiple strings, such as multiple product names or city names. Involves bulk text processing, such as filtering and sorting text; assigning a string array simplifies operations.
Object Stores data in key-value pairs, such as user information or order details. Handles structured complex data, such as data storage and retrieval; assigning object data ensures data integrity.
  • Write Mode
    variable add a new line.png

      The write mode determines how the target variable is assigned new values, and there are three options:

      1. Append ModeAdds new values to an existing variable; strings will concatenate, arrays will add elements, preserving the original data and incrementally updating it.
      2. Overwrite ModeCompletely replaces the old value of the variable with the new value, updating the variable's content to the latest data.
      3. Array MergeFor array variables, merges the new array with the original array's contents to form a new array that includes elements from both.
    • When using write mode: in "Append Mode," when assigning values to non-array type variables, you can choose whether to "automatically add a newline.
  • Type
    variable type
      Define the input type for the value, with the following two options:
    1. Variable
        Indicates that the value is derived from other existing variables in the workflow. This allows the current variable to be assigned using data that has already been generated or stored, enabling data transfer and sharing between variables.
    2. Value
        Directly uses a static value specified by the user to assign a value to the variable. This value does not change dynamically during the execution of the workflow and is fixed input content.
  • Valua
    variable value

      The input value refers to the data content used to assign to the target variable. The following considerations apply to input values:

    1. Data Type Consistency
        The data type of the input value must be consistent with the data type of the target variable. For example, if the target variable is [Number], the input value must also be a number.
    2. Array Type Input Values
        When the target variable is of array type, the input value must also be an array or a single element. If in numeric merge writing mode, the input value must be an array. Boolean Type Restriction: For target variables of [Bool] type, the input value can only be [true] or [false].
    3. Required
        [Input Value] is required and cannot be left blank; otherwise, the configuration cannot be saved.

Notes

  • In the "Add New Variable" option, the "Append Mode" for the writing mode is not available.
  • The target variable for "Append Mode" must be of array/string type. For example, if the target variable is Array [Number], the input variable must be of Number type.
  • The target variable for "Array Merge" must be of array type.

Practical Case Scenario

variable workflow
  • Customer Service Scenario: Dynamically record the contact information filled in by users and automatically generate subsequent personalized reminders.
    Users enter their contact information (such as mobile phone number, email address) during the conversation. Through the "Variable Assigner" node, this information is stored in a session variable. The system can use this variable in subsequent conversations to automatically identify the user and push personalized reminders or notifications.
  • Design Steps for Customer Scenario Workflow:
    1. Set Session Variable: Create a session variable, for example [userContact], to store the user's contact information. Set [userContact] as an object (Object) to facilitate the recording of fields such as email and phone number in the future.
    2. Information Extraction: In an LLM node, prompt the model to extract valid contact information from the user's input. The output will map the user's input email or phone number into key-value pairs, for example
      {"email": "...", "phone": "..."}.
    3. Variable Assigner: Use the "Variable Assigner" node to assign the extracted information to the session variable [userContact]. The writing mode can be set to [Overwrite Mode] or [Append Mode] depending on the needs (Overwrite Mode: completely replaces the existing [userContact] value; Append Mode: only updates existing fields or adds new fields without affecting other stored fields). The [Input Type] is selected as [Variable], meaning the input value is dynamically generated by the workflow and not a fixed value.
    4. Subsequent Reference: In subsequent conversations, by inserting a reference to the [userContact] variable, the model can directly access the user's email or phone number. Based on needs, automatically send reminders or generate personalized greeting statements for the user.
Updated on: Jun 25, 2025
Prev JSON Variable Extractor
Next Variable Extractor
On this page
  • Definition
  • Quick Start/How to Use
    • Target Variable
    • Assigned Variable
    • Write Mode
    • Type
    • Valua
  • Notes
  • Practical Case Scenario
loading...
No Results