Skip to content
AI Agent Sub-Workfl...
 
Notifications
Clear all

AI Agent Sub-Workflow Tool - Error: "The workflow did not return a response"

9 Posts
4 Users
0 Reactions
3 Views
mavoe
(@mavoe)
Posts: 4
Active Member
Topic starter
 

Hi,

I'm looking to implement an AI agent that utilizes another implemented workflow as a tool.

Everything seems to be working correctly; the workflow is called successfully, but the tool node within the main workflow is failing with the error message: "The workflow did not return a response".

When I examine the executions of the (sub-)workflow, it appears to have run successfully and returned a response.

Output from the last node:

[
  {
    "success": true,
    "operation": "notification",
    "collection": "notifications",
    "document_id": "notification_1749455645813",
    "correlation_id": "cs_1749455642429_731143361",
    "timestamp": "2025-06-09T07:54:05.813Z",
    "metadata": {
      "records_inserted": 1,
      "workflow": "BOA_NotificationService_v1.0",
      "version": "2.0",
      "telegram_sent": true,
      "email_sent": false
    }
  }
]

I've spent several hours on this issue without any progress. I tried using a SET Node instead of a Code node as the final node within the sub-workflow, but the result was the same.

I prefer not to implement an HTTP Request, as the sub-workflow will only be used internally within callin.io.

I would greatly appreciate any help!

:slight_smile:

  • Best regards.

Information on my callin.io setup

  • callin.io version: 1.95.3
  • Database: postgressdb
  • Running callin.io via: docker
  • Operating system:Debian GNU/Linux 12 (bookworm)
 
Posted : 09/06/2025 8:00 am
Gallo_AIA
(@gallo_aia)
Posts: 22
Eminent Member
 

Hello,

Even if your sub-workflow executes successfully and concludes with a Set or Code node, the AI Agent might still display this error. This occurs because when a sub-workflow is utilized as a tool, it requires a specific response structure.

This behavior has been previously noted and discussed within the community:

Consider using the Respond to a Webhook node (Respond to Webhook | callin.io Docs) to manage the response to incoming webhooks. Attempt to set the response to "First incoming Item".

 
Posted : 09/06/2025 8:38 am
mavoe
(@mavoe)
Posts: 4
Active Member
Topic starter
 

Hi,

you mean I need to use the HTTP request /“webhook” method since there isn't another option available at the moment?

 
Posted : 09/06/2025 8:52 am
Gallo_AIA
(@gallo_aia)
Posts: 22
Eminent Member
 

I've done some research and don't believe there are other solutions, but I can't offer 100% certainty, of course.

:slight_smile:

 
Posted : 09/06/2025 9:06 am
Wouter_Nigrini
(@wouter_nigrini)
Posts: 31
Eminent Member
 

To preserve the JSON object, you will need to utilize a Structured output on the agent.

If no structured output is provided, the system will attempt to use a valuable part of the response. If structured output is available, it will simply return what the sub-node produces, which in this case is a JSON object.

 
Posted : 09/06/2025 9:20 am
mavoe
(@mavoe)
Posts: 4
Active Member
Topic starter
 

Perhaps I'm not grasping your response, but from my perspective, the issue isn't with the agent's output, but rather with the tool's output, which is absent.

Could you please provide the output from the tool?

 
Posted : 10/06/2025 9:54 am
Wouter_Nigrini
(@wouter_nigrini)
Posts: 31
Eminent Member
 

It's challenging to grasp your issue without seeing the workflow. Could you please share it within a code block? My example successfully retrieves data from the sub-node, indicating that the problem likely lies elsewhere in your workflow.

 
Posted : 10/06/2025 11:16 am
mavoe
(@mavoe)
Posts: 4
Active Member
Topic starter
 

Hi all,

I've resolved my issue. It wasn't related to the AI Agent itself, nor its integration with “Execute Sub-Workflow”. The problem stemmed from an error-prone workflow architecture.

Problem: My workflow had two parallel streams after a switch node, both converging into a single “Code Node” later on.

My assumption that my JavaScript code using
javascript
.all()

would handle these potential race conditions was incorrect.

Implementing a “Merge Node” just before the Code Node, which also handles the final output, resolved everything.

 
Posted : 10/06/2025 3:36 pm
system
(@system)
Posts: 332
Reputable Member
 

This thread was automatically closed 7 days following the last response. New replies are no longer permitted.

 
Posted : 17/06/2025 3:37 pm
Share: