Skip to content

Dynamic routing via MCP/Function nodes: can response variables drive conditional edges? #398

@KulAnkur

Description

@KulAnkur

Goal

I want a single agent to handle many projects. Caller says name + project, I look up enabled sections in my backend, then the flow only asks those sections.

What I tried

I expected a webhook to choose the next node at runtime, but it looks like flow edges are static and can’t be overridden by a webhook response.

Proposed approach

  1. Intro node → collect project name
  2. Extract dynamic variables node → project_identifier
  3. MCP or Function node → call backend and return enabled sections
  4. response_variables → set dynamic variables (e.g., enabled_manpower=true)
  5. Conditional edges (equation conditions) → route only to enabled sections

Questions

  • Can MCP/Function nodes set response_variables that are then usable in edge conditions?
  • Are equation conditions supported on edges for conversation nodes and branch nodes?
  • Is there an example of this pattern in the SDK or docs?

Why this matters

I have a large number of projects. One agent per project (or phone number per project) is not feasible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions