Add else Condition in IF nodes Expression

is this possible to add an if-else statement in IF nodes Expression

Example: :arrow_down:

{{$node["Telegram Trigger"].json["message"]["from"]["id"] ? else : Message not Found}}

For Empty JSON it tries this work well

But I want else condition for Node Expression

Yes this is almost correct:

{{ $node["Telegram Trigger"].json["message"]["from"]["id"] ? $node["Telegram Trigger"].json["message"]["from"]["id"] : 'Message not Found' }}

Perfect working

You can now also use

{{ $if(condition, value_if_true, value_if_false) }}

Which is a little easier to read.


1 Like