Skip to content
Callin.io Workflow ...
 
Notifications
Clear all

Callin.io Workflow Tool

6 Posts
2 Users
0 Reactions
4 Views
Alessandra_Rospiglio
(@alessandra_rospiglio)
Posts: 3
Active Member
Topic starter
 

I'm encountering an issue with the callin.io workflow tool where it's not sending the correct workflow inputs, causing my AI Agent to throw errors.

 
Posted : 01/06/2025 12:50 pm
Gallo_AIA
(@gallo_aia)
Posts: 22
Eminent Member
 

Hello, welcome to the community!

From what I can see, you’re using the callin.io Workflow Tool inside an AI Agent to call a secondary workflow, but the AI Agent is failing because the input values aren’t arriving correctly.

The Call Workflow Tool expects the AI Agent to map its outputs to the input schema of the workflow being called. In your third screenshot are only three input fields declared or all fields that present in AI agent’s side?

 
Posted : 01/06/2025 2:21 pm
Alessandra_Rospiglio
(@alessandra_rospiglio)
Posts: 3
Active Member
Topic starter
 

Hi there!

First, thanks for your response. Let me explain it better: All the input fields are declared (there are 5 in total). The issue is that I'm not getting the correct expression. When I test my workflow, incorrect information is being sent to my 'When executed by another workflow' node in my sub-workflow. If I use fixed expressions, I get the correct response. I'm not sure if you understand exactly what I mean.

 
Posted : 01/06/2025 2:35 pm
Gallo_AIA
(@gallo_aia)
Posts: 22
Eminent Member
 

It seems the problem isn't with missing input fields in the schema, but rather how the AI Agent is generating or passing these values dynamically when initiating the sub-workflow.

  • Examine the AI agent's output
    In the execution logs, expand the AI Agent node and look under tool_calls → inputs to verify the values it's actually sending. This will confirm if provider_name, target_month, etc., are present and not empty.

  • Log the inputs immediately before the Call Workflow Tool
    Insert a simple Set node just before the Call Workflow Tool and log the values from $fromAI(...). This will allow you to see what the AI has actually parsed and is passing to the workflow.

  • Occasionally, AI Agents return values in a nested structure (for instance, a tool input named "inputs": { ... } rather than flat keys). This means $fromAI("provider_name") won't resolve unless the nesting is managed properly.

 
Posted : 01/06/2025 2:43 pm
Alessandra_Rospiglio
(@alessandra_rospiglio)
Posts: 3
Active Member
Topic starter
 

As mentioned, the primary challenge lies in how the “AI Agent” node passes dynamic values when invoking my sub-workflow, which is responsible for the Snowflake logic.

Here’s an update on my progress and the specific point where I’m encountering difficulties:

  1. The AI Agent node IS correctly parsing arguments: I’ve examined the complete JSON output from the AI Agent node, and it accurately generates the required information. The arguments intended for the tool (let’s refer to it as SnowflakeTPVAnalyzer) are clearly present within a intermediateSteps[0].action.toolInput structure, and also in a more nested location under kwargs.messageLog.kwargs.tool_calls[0].args. For instance, when processing “TPV de Cielo en marzo 2024”, the toolInput correctly displays { "provider_name": "Cielo", "target_month": "2024-03", "view_type": "monthly_summary" }. The “Return Intermediate Steps” option is enabled on the AI Agent node.

  2. The Sub-Workflow functions with static values: I’ve set up a test sub-workflow (“Echo Test”) with its trigger configured to “Define using JSON example”. This setup includes the fields I anticipate (provider_name, view_type, etc.). When I navigate to the SnowflakeTPVAnalyzer tool configuration within the AI Agent node and input fixed values for these parameters (e.g., setting provider_name to “Cielo”), the test sub-workflow successfully receives and displays them. This confirms that the sub-workflow invocation and the sub-workflow itself are functioning correctly when provided with data.

  3. The Core Issue: Mapping Dynamic Inputs in the AI Agent’s Tool Configuration:

    • When I attempt to utilize dynamic expressions within the “Value” fields under “Workflow Inputs” for the SnowflakeTPVAnalyzer tool (for parameters like provider_name, view_type, etc.), I am unable to access the arguments that the AI has parsed.
    • I’ve experimented with expressions such as {{ $json[0].intermediateSteps[0].action.toolInput.provider_name }} and {{ $json.intermediateSteps[0].action.toolInput.provider_name }}. Both yield an “undefined” preview in the expression editor, and consequently, the sub-workflow receives “undefined”. The first expression was even highlighted in red within the editor.
    • Crucial Observation: If I input {{ $json }} as the value in these mapping fields, the sub-workflow receives the original input provided to the AI Agent node (for example, the complete Slack event object), rather than the processed output or the intermediateSteps from the AI Agent.
    • I also tried using {{ JSON.stringify($CurrentNode) }}, but the sub-workflow received "{}" (a stringified empty object). This suggests that $CurrentNode in this specific context does not appear to contain the intermediateSteps in an accessible manner.

My primary question is: Considering that $json within the “Value” fields for “Workflow Inputs” (in the AI Agent’s tool configuration) refers to the node’s initial input, how can I access the intermediateSteps[0].action.toolInput structure (or a similar structure containing the arguments parsed by the LLM for the current tool) from these mapping expressions? Is there a specific context variable that the “AI Agent” node makes available for this purpose when configuring a tool/sub-workflow call?

Any insights or guidance on which context variable I might explore within the expression editor for these mapping fields would be immensely valuable. I’ve been stuck at this stage for the past three days…

 
Posted : 01/06/2025 2:52 pm
Gallo_AIA
(@gallo_aia)
Posts: 22
Eminent Member
 

Hello,
thanks for all the details.

i suspect this is a bug that I've also encountered occasionally: both with drag and drop and when manually entering variables, they sometimes ended up as "undefined".

Unfortunately, I don't have a scientific method to make them work; I tried several times, and eventually, it started working.

I'm not sure if you have the latest version of the tool updated. If not, I recommend doing so.
Save the workflow and try again.

Another test you could perform is to try creating the workflow from scratch by importing the old one via JSON and see if you encounter the same error in the new workflow.

 
Posted : 03/06/2025 5:05 am
Share: