Send both binary file and Json text response in a Webhook response

Send both binary file and text in one webhook response

Not sure if it is possible - but I cannot figure out how to send in one webhook response both binary file and text response. I can either send binary file (mp3 recording) or text response. The text response can include the description of the file, but in the format that the other app cannot transform it into the recording.

What I do in my workflow is create text, then having a text to speech node and merge it all together.

I then see the merged data, but because I respond with Binary File my app do not see the text response.

Here is the text response:

And then if I Respond with all incoming items, I only get mp3 file in the JSON format which I cannot do anything at my app side (the link does not allow to download the mp3):
{

“mimeType”: “audio/mp3”,

“fileType”: “audio”,

“fileExtension”: “mp3”,

“fileName”: “audio.mp3”,

“id”: “filesystem-v2:workflows/xmoGDb8b3BElI2m8/executions/613/binary_data/37686b4b-560b-440e-b08e-2e1244c92604”,

“fileSize”: “676 kB”

}

The question is how to send both binary file and JSON text which I see in the merged JSON file? Or alternatively, how can I send a link in JSON text response which I can transform into mp3 file in the app?

Your Merge Node is creating two items. Is this your intent? From your post, it seems like you want the Merge to create a single item. Try these settings in Merge, and see if it fixes your issue.

Thanks, I changed it. I see both binary file and text as an input in my webhook node. The problem is that I can either send JSON response with the text and link to the file in the format I share below or only binary file without the additional text:
“mimeType”: “audio/mp3”,
“fileType”: “audio”,
“fileExtension”: “mp3”,
“fileName”: “audio.mp3”,
“id”: “filesystem-v2:workflows/xmoGDb8b3BElI2m8/executions/772/binary_data/a2b9636e-d066-4246-b392-c31ef027f213”

If I send the file in this JSON format I cannot understand how can I download the file following this link as it seems to be N8N internal link. And if I respond with the binary file - I cannot add my text response.