tencent cloud

IF/ELSE Node
Last updated:2025-09-12 15:42:54
IF/ELSE Node
Last updated: 2025-09-12 15:42:54

Node Function

IF/ELSE Node belongs to Basic Node, compares two input values based on logic, and determines the subsequent branch to route to according to the result judgment.




Directions

Set Conditions

Supports adding if-else conditions, each condition supports configuring logical expressions, and expressions support "AND" and "OR" logic. These logical expressions can be flexibly organized based on requirements.
A logical expression supports two methods: referring to the output variable of an ancestor node and filling a fixed value.
Supports switching judgment methods, including "Large Language Model understanding semantic judgment" and "accurate judgment". Recommended for use is LLM understanding semantic judgment, where the model used matches the "application's thinking model". Use accurate judgment when strict judgment conditions are required.
"else" means failing to satisfy all conditions, supports skipping configuration. If you need to process fallback response, it can be connected to "reply node".




Condition Configuration

Logical expression
Left Value
Right Value
Equal to
string
string
int
int
float
float
bool
bool
array<string>
array<string>
array<int>
array<int>
array<float>
array<float>
array<bool>
array<bool>
Not equal to
string
string
int
int
float
float
bool
bool
array<string>
array<string>
array<int>
array<int>
array<float>
array<float>
array<bool>
array<bool>
Greater than
int
int, string (supported only when manually entering a convertible numeric string)
float
int, string (supported only when manually entering a convertible numeric string)
Greater than or equal to
int
int, string (supported only when manually entering a convertible numeric string)
float
int, string (supported only when manually entering a convertible numeric string)
Less than
int
int, string (supported only when manually entering a convertible numeric string)
float
int, string (supported only when manually entering a convertible numeric string)
Less than or equal to
int
int, string (supported only when manually entering a convertible numeric string)
float
int, string (supported only when manually entering a convertible numeric string)
Create and bind policy Query instance Reset instance access password
string, int, float, bool, array<string>, array<int>, array<float>, array<bool>, array<object>, object, file, doc, img, aud, vid,array<file>, array<doc>, array<img>, array<aud>, array<vid>

unpadded
string, int, float, bool, array<string>, array<int>, array<float>, array<bool>, array<object>, object, file, doc, img, aud, vid,array<file>, array<doc>, array<img>, array<aud>, array<vid>

belong
string
string
int
int
float
float
bool
bool
array<string>
array<string>
array<int>
array<int>
array<float>
array<float>
array<bool>
array<bool>
Not in
string
string
int
int
float
float
bool
bool
array<string>
array<string>
array<int>
array<int>
array<float>
array<float>
array<bool>
array<bool>
Contain
string
string
array<string>
array<string>
array<int>
array<int>
array<float>
array<float>
array<bool>
array<bool>
Not included
string
string
array<string>
array<string>
array<int>
array<int>
array<float>
array<float>
array<bool>
array<bool>

Output Variable

By default include the selected serial number of conditional statements, as well as runtime error message Error (data type is object, this field is empty when functioning properly). Does not support manually add.




Application Example

Write an article based on the user input topic and style, and judge through conditional judgment node whether the user requires article cover generation.



Among them, the IF/ELSE node configuration is as follows:




FAQs

Does the "else" part of the IF/ELSE node need to connect to the subsequent process?
Each branch needs to connect to the subsequent process.
Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback