Could you explain the procedure for extracting binary data from a specific node?

AI agents do not access any data except for text. I want to extract binary data from the node that precedes the current one. Could anyone support me?

You can grab binary data from previous nodes using a Code node.

Here’s how:

// Get binary data from a specific node
const binaryData = $node["Transcribe a recording"].binary;

// If you want a specific binary property (like 'data')
const audioFile = $node["Transcribe a recording"].binary.data;

// Return it so the next node can use it
return [{
  binary: {
    data: audioFile
  }
}];

Place a Code node between “Transcribe a recording” and your HTTP Request1 node. This pulls the binary output and passes it forward.

The AI Agent limitation you’re hitting is correct - agents work with text/JSON by default. If you need the agent to process the audio, you’d typically:

  1. Transcribe it first (which you’re doing)
  2. Pass the transcription text to the agent
  3. Use the binary in a separate branch if needed

What are you trying to do with the binary in the HTTP Request1 node? Depending on your use case, there might be a cleaner way to structure this.

I need the voice file in binary to assess pronunciation which uses the native API of Azure speech. If I use your solution, the file information is returned. So an error will jump in.

Can you share output of the node from where you are trying to get binary data.

I use the Telegram API to download a voice file in binary format.

This component functions as a subnode within the AI Agent. As I mentioned, the AI agent primarily accepts various forms of text input, Therefore, this subnode cannot refer to binary data, so I must refer to it indirectly, and it will be written in the parameter as shown in the picture below:

So, I think that I need an expression to refer to a binary file directly.

I have found a solution. Thank you very much for your support; it really means a lot to me.

2 Likes

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