Forum Discussion

jefry-then's avatar
jefry-then
Copper Contributor
Nov 19, 2026
Solved

Pass a variable in topic to agent flow

Hi there,   How do we pass an output variable from a topic to be used as input in agent flow? I have stored the output of an action into a variable. In my agent flow, I could not find my vari...
  • Amezingtechsatara's avatar
    Nov 21, 2026

    You're looking in the wrong place for the variable, and that's the bit that trips most people up — the flow can't see topic variables at all. The handoff happens where the topic calls the flow, not inside the flow designer. And your second screenshot actually shows why it's stuck: the input on your trigger is called Data entity, but its type reads Unknown. A topic variable can't be matched to an input with no type, so nothing shows up to pick.

     

    Start there. In the flow designer, click that input on the When an agent calls the flow trigger and give it a proper type — Text, for a data entity name — then publish the flow again. The flow also needs a Respond to the agent action at the end, and it has to be published before the agent can use it at all.

     

    Then add it to the agent as a tool: Tools, Add a tool, Flow, pick the published flow, Add and configure, and under Inputs choose how each input gets filled. Finally, back in your topic, add an action node that calls the flow, and for its input pick your topic variable from the variable picker. The variable's type has to match the input's type, which is exactly what the Unknown type was blocking. So the variable never lives in the flow; it just gets handed over at the moment the topic calls it. If the flow doesn't appear in the Tools list at all, it's usually because it isn't published yet, or it doesn't have that agent trigger.