Allow AI Agent tool send "return in webhook" several times

When AI Agent using tools like web search using node HTPP Request, it will take longer time to give respond to the user. Sometimes it will confuse the user, is the AI working or not.

So the idea are :

  1. AI Agent call tool using HTTP Request named “WebSearch”

  2. Create new workflow named “WebSearch”


  3. inside Webhook choose respond as “Using ‘Respond to Webhook’ Node”
    image

  4. So, when the user ask about the news then AI Agent will call WebSearch and should send two response :
    a. “wait a moment, please” from inside WebSearch tool
    b. the result from AI Agent using WebSearch result like “the news are …”

But when I run the workflow, I get one result “wait a moment, please”.

Is there any workaround to solve this problem ?

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

Hey @davidjm,

What you are seeing is to be expected, You have told the webhook trigger to reply with the contents of the respond to webhook node which is what it is doing but this will only happen when the ai agent node has finished.

To show a waiting message as you are using the webhook node you would need to implement your own loading state in your webpage which could be something like loading a spinner, sending the request then once the request is done removing the spinner this is normally how this kind of process is done.

Let me know if you have any questions on this.

Hi @Jon,

Thanks for the idea.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.