docs.langflux.space
  • Welcome to LangFlux
  • Using LangFlux
    • API
    • Streaming
    • Embed
    • Variables
  • Configuration
    • Auth
      • Chatflow Level
    • Rate Limit
  • Integrations
    • Cache
      • InMemory Cache
    • Chains
      • Conversational Retrieval QA Chain
      • Vectara QA Chain
    • Document Loaders
      • S3 File Loader
      • PDF Files
    • Chat Models
      • Azure ChatOpenAI
      • ChatLocalAI
      • Google VertexAI
    • Embeddings
      • Azure OpenAI Embeddings
      • LocalAI Embeddings
    • Memory
      • Short Term Memory
      • Long Term Memory
        • Zep Memory
      • Threads
    • Text Splitters
      • Character Text Splitter
    • Tools
      • Custom Tool
    • Vector Stores
      • Chroma
      • Pinecone
      • Elastic
      • Qdrant
      • SingleStore
      • Supabase
      • Vectara
    • Utilities
      • Set/Get Variable
      • If Else
    • External Integrations
      • Zapier Zaps
  • Use Cases
    • Web Scrape QnA
    • Webhook Tool
Powered by GitBook
On this page
  • Input Variables
  • If Else Name
  • If Function
  • Else Function
  • Output

Was this helpful?

  1. Integrations
  2. Utilities

If Else

PreviousSet/Get VariableNextExternal Integrations

Last updated 1 year ago

Was this helpful?

Flowise allows you to split your chatflow into different branches depending on If/Else condition.

Input Variables

As noticed from the image above, it takes in any nodes that has json output. Some examples are: Custom Function, LLM Chain Output Prediction, Get/Set Variables.

You can then give a variable name:

$output

If Else Name

You can name the node for easier visualization of what it does.

If Function

This is a piece of JS code that is ran on Node sandbox. It must:

  • Contains the if statement

  • Returns a value within if statement

This gives much more flexibility for users to do complex comparison like regex, date comparsion and many more.

Else Function

Output

User can also take a look at the If Else template in the marketplace:

This variable can then be used in the and with the prefix $. For example:

Similar to If Function, it must returns a value. This function will only be ran if the does not return a value.

When the successfully returns a value, it will be passed to the True output dot as shown above. This allow users to pass the value to the next node.

Otherwise, the returned value from will be passed to the False output dot.

If Function
Else Function
If Function
If Function
Else Function