I've tested with chat, and the built-in app agent AI functions without any problems. However, when data originates from a webhook and you include a response webhook, the AI agent does not execute the node.
Any insights, or could this be a bug?
(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
Share the output returned by the last node
Information on your callin.io setup
- callin.io version:
- Database (default: SQLite):
- callin.io EXECUTIONS_PROCESS setting (default: own, main):
- Running callin.io via (Docker, npm, callin.io cloud, desktop app):
- Operating system:
Hi,
Could you share your workflow so we can understand what's occurring?
Could you please share the workflow code? Simply select all nodes and paste them here within a code block.
I'm not certain how to accomplish that at the moment.
- Select all nodes.
- Copy.
- Create a code block here:
This is a code block
- Paste inside the code block.
The agent is only aware of the nodes directly below it, not those positioned to its right.
If you need the ‘book appointment’ step to execute consistently, it’s advisable to place it as a standard (square) node between the agent and the ‘respond to webhook’ step. You can then extract the booking details from the agent’s output and connect them accordingly.
I could achieve that without any problems, but I'm trying to understand why the AI agent isn't handling that specific part when using a webhook. It functions correctly when I use chat or Telegram, so I find this behavior unusual.
P.S. I am sending the same POST data, which is:
json
{"email": "email@email.com"}
The problem likely stems from how the AI agent handles and executes tools within callin.io. Since the AI agent is only aware of the nodes directly below it, not those to its right, it might not be properly triggering the book_appointment
tool before the Respond to Webhook
step.
Fix: Restructuring the Workflow
Steps to Fix It
-
Move the
book_appointment
tool into the main execution path- Instead of relying on the AI agent to invoke the
book_appointment
tool, integrate it as a standard node between the AI agent andRespond to Webhook
. - This ensures that
book_appointment
will consistently execute prior to the webhook's response.
- Instead of relying on the AI agent to invoke the
- Modify the AI agent’s output
* Confirm that the AI agent outputs structured data containing the appointment details.
* Link the output from the AI agent to the `book_appointment` node.
- Ensure Execution Order
* Connect the output of the `book_appointment` node to `Respond to Webhook`, so it only runs after the appointment has been successfully booked.
Updated Flow Structure
- Webhook → 2. AI Agent → 3. Book Appointment Node (Direct Execution, Not via AI Tool Call) → 4. Respond to Webhook
This arrangement guarantees that the appointment booking process is completed before the webhook sends its response.
Would you like assistance in modifying your workflow with step-by-step instructions? This was a ChatGPT reply.
Thanks, I understand that flow would work, but my concern is the agent not recognizing the tools underneath it when you use the respond webhook.
I also wonder why the Respond webhook cannot be added under the tools of the AI agent.
The AI agent also does not recognize commands like:
e.g.
Use the following hook in order:
- use hook_1
- use hook_2
- use hook_3
Agents can sometimes be unreliable with complex instructions. It's possible that whether your agent calls a tool is not directly tied to the presence of a webhook, but rather to the natural variability in the agent's decision-making process.
As a general guideline, you should aim to simplify instructions given to AI as much as possible. For instance, if you need the AI to call three tools in a specific sequence, consider consolidating them into a single tool that consistently performs those actions.
This can be achieved by creating a sub-workflow using standard (square) nodes to execute your three actions sequentially. You can then add this consolidated workflow as a tool for the agent.
Thanks, I actually tried that, but it still didn't trigger the tools when using webhooks. I'll continue experimenting with it.