Coordinator Agent couldn't use the output of Tool Agent as an input on a different Tool that Coordinator operates

:red_question_mark: Describe the problem / error

I’m working on a multi-agent workflow in n8n where:

  • Summarize Agent generates a summary_html (department-based meeting summary).
  • This summary_html is sent to CreatingPDF Tool to generate a PDF (works fine).
  • After the user writes “onaylıyorum” (I approve) in the chat, Coordinator Agent should trigger EmbeddingTool (a tool workflow) to chunk and embed the summary_html into Supabase.

The problem: The correct summary_html from Summarize Agent never reaches the EmbeddingTool correctly.


:pushpin: What is happening now

  • When Coordinator Agent triggers EmbeddingTool, the data arrives like this:

json

KopyalaDüzenle

[
  {
    "query": {
      "summary_html": "<html> <head> <title>Meeting Summary</title> … </html>"
    }
  }
]
  • But EmbeddingTool’s Code node expects summary_html at the root level like this:

json

KopyalaDüzenle

{
  "summary_html": "<strong>Üretim & Tedarik</strong><br><ul> … </ul>"
}

Because of this mismatch, chunking code inside EmbeddingTool doesn’t run on the correct HTML and breaks the semantic structure.


:white_check_mark: What is working fine

  • Summarize Agent is producing the correct summary_html (with <strong>Department</strong>, “Rutin Konular” and “Projeler” sections).
  • CreatingPDF Tool successfully gets the correct HTML because it uses this expression:

bash

KopyalaDüzenle

{{$fromAI('summary_html', '', 'string')}}
  • PDF creation works as expected.

:red_exclamation_mark: What I tried

  • I copy-pasted the same expression from CreatingPDF Tool into EmbeddingTool input mapping:

json

KopyalaDüzenle

"summary_html": "={{ $fromAI('summary_html', '', 'string') }}"
  • But this causes the value to arrive wrapped in query.summary_html, not as plain summary_html.
  • I also tried replacing the expression with:

bash

KopyalaDüzenle

{{$json.summary_html}}

But Coordinator Agent still sends the same “query” wrapped object.


:magnifying_glass_tilted_left: What I need help with

How can I pass the raw summary_html (generated by Summarize Agent) directly to EmbeddingTool, without it being wrapped inside query or other objects?

  • Should I change the way fromAI() is used?
  • Should I remap the output of Summarize Agent before calling EmbeddingTool?
  • Is there a best practice for sending a raw string field like summary_html from one Agent Tool to another Tool Workflow in n8n?

:hammer_and_wrench: Workflow Context

  • Summarize Agent → outputs summary_html correctly.
  • CreatingPDF Tool → works fine with $fromAI('summary_html', '', 'string').
  • Coordinator Agent → triggers EmbeddingTool after user approval.
  • EmbeddingTool → expects summary_html at root, but receives { query: { summary_html: … } }.

:open_file_folder: What I’m looking for

:white_check_mark: A way to flatten or remap the summary_html field so EmbeddingTool receives it exactly as:

json

KopyalaDüzenle

{
  "summary_html": "<strong>Üretim & Tedarik</strong> …"
}

and not wrapped under query.summary_html.


:writing_hand: Any guidance, examples, or best practices would be greatly appreciated!

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