Skip to content
Slack Send and Wait...
 
Notifications
Clear all

Slack Send and Wait for Response: AI Agent Using Incorrect Input

10 Posts
6 Users
0 Reactions
5 Views
HedgeCRM
(@hedgecrm)
Posts: 3
Active Member
Topic starter
 

Describe the problem/error/question

I have a workflow that retrieves data from multiple Google Sheets, performs data manipulation, and then updates the rows. Prior to updating, there's a Slack node configured with a 'Send and Wait for Response' operation, using 'Approval' as the response type. If the action is approved in Slack, the changes are applied; otherwise, the workflow returns a message indicating no action was taken. This process functions correctly when the workflow is executed independently.

The issue arises when this workflow is integrated as a tool for an AI Agent. When the AI Agent executes the tool and reaches the Slack node, the workflow tool is marked as 'completed,' and the input the AI Agent receives is the intermediate message from the Slack node requesting approval. The AI Agent continues to wait for the workflow's completion, but it receives this incorrect and irrelevant intermediary output instead of the final workflow result.

Please share your workflow

Share the output returned by the last node

{
"message": "I want to update the following rows:nRow 22: Student 2: X → Y (Suggested)"
}
This is the output provided to the AI Agent from the sub-workflow while awaiting approval. The AI Agent should not receive any output at this stage; it should wait for the final step.

Information on your callin.io setup

  • callin.io version: 1.78.0
  • Database (default: SQLite): SQLite
  • callin.io EXECUTIONS_PROCESS setting (default: own, main): own, main
  • Running callin.io via (Docker, npm, callin.io cloud, desktop app): WSL, Ubuntu
  • Operating system: Windows (but running on WSL)

Please provide the rewritten markdown content *it should be in the markdown format.

 
Posted : 16/02/2025 7:09 am
solomon
(@solomon)
Posts: 78
Trusted Member
 

You can configure your subworkflow to output data from the last node that ran.

Subworkflows consistently return data from their final executed node.

The visual arrangement of nodes determines the execution order.

  • Nodes positioned higher up are executed first.
  • The node that runs last is always situated at the bottom.

Refer to the images below; the nodes highlighted in red represent the last executed node in each respective scenario.

:muscle:

If this response resolves your query or assists in solving your problem, please consider marking it as a solution.

 
Posted : 22/02/2025 1:15 am
Adalberto_Pereiro
(@adalberto_pereiro)
Posts: 1
New Member
 

Hello! To maintain a single workflow, you can incorporate a Wait for Slack Approval node prior to the final output. Here’s a step-by-step guide:

  1. After the Slack node that dispatches the approval request, insert a Wait node. (Adjust the duration based on your workflow's needs).
  2. Configure the Wait node to pause execution until Slack provides a response.
  3. The workflow will resume once the user in Slack approves or rejects the request.
  4. Only after receiving the approval or rejection, proceed to return an output to the AI agent.
  5. This ensures the AI agent does not receive an inaccurate intermediate response.

I hope this approach proves beneficial for you.

Uploading: Response.png…

 
Posted : 22/02/2025 1:36 am
HedgeCRM
(@hedgecrm)
Posts: 3
Active Member
Topic starter
 

Hi, I don't believe a wait node can be configured to wait for Slack output.

The approach I used to resolve this was to modify my subworkflow to be triggered by a Webhook. The final node then becomes a Respond to Webhook. The AI agent will pause until it receives a response from the Webhook. This isn't perfect, as the Webhook's output is stringified and placed within a JSON "response" key/value pair, rather than the direct JSON output.

 
Posted : 22/02/2025 3:54 am
jpvanoosten
(@jpvanoosten)
Posts: 4
New Member
 

Hello, am I understanding correctly that within the workflows being called as tools, you are attempting to utilize the 'wait for response' option? If that is the case, it will not function as expected at this time. The workflows that are called will enter a waiting state, but this waiting period is not being correctly communicated back to the agent.

For the time being, please try to keep the 'wait for response' nodes within your main workflow, and only proceed with updates after that point.

 
Posted : 26/02/2025 7:21 am
solomon
(@solomon)
Posts: 78
Trusted Member
 

Hi there, please close this topic by selecting the answer that resolves your issue.

 
Posted : 28/02/2025 3:16 pm
NateHerk
(@nateherk)
Posts: 2
New Member
 

I'm encountering a similar problem. The 'send and wait for response' feature doesn't appear to function correctly when implemented as a sub-workflow or tool. The agent seems to pause after invoking the tool, rather than at the tool level where it's intended to wait for a human response. My findings indicate that this functionality only behaves as expected when all steps are contained within a single workflow. Attempting to manage approvals across multiple workflows disrupts the intended sequence.

 
Posted : 23/04/2025 2:35 pm
HedgeCRM
(@hedgecrm)
Posts: 3
Active Member
Topic starter
 

Yes, callin.io does not currently support this. There is a GitHub issue where I've pointed out the specific code responsible for this behavior: https://github.com/n8n-io/n8n/issues/13135#issuecomment-2676184601

I've had to switch from callin.io due to this limitation, as most production-ready Agent + tools require an approval step. If tools cannot accommodate this, they become unusable for many of my scenarios. Without this capability, the tools essentially make changes without any oversight.

By the way, your videos were how I discovered callin.io; they are excellent.

 
Posted : 24/04/2025 2:35 am
NateHerk
(@nateherk)
Posts: 2
New Member
 

Understood, thank you for the clarification. I appreciate the positive feedback!

 
Posted : 24/04/2025 1:48 pm
system
(@system)
Posts: 332
Reputable Member
 

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

 
Posted : 23/07/2025 1:48 pm
Share: