How to pass image from chat trigger which could be consumed by HTTP request tool in AI agent

Questions

Is it possible to pass through a binary image to http request tool.

What I did?

  • Found a conference video from n8n 10 months ago mentioned it’s not possible to pass binary image however there is an option to accept binary data in http request tool.

Please share your workflow

Share the output returned by the last node

Information on your n8n setup

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

Hi there, welcome to the community, in a glance, your workflow seems legit, so does it have any issue? or error? have you tried it?

thank you!

Thank you for your response:

Whenever I initiate a message trigger. The AI-agent is not able to send text to the LLM model. Thus results in error: Non string message content not supported.

For your reference:

I tried to imitate your workflow but using gemini as the LLM and it works fine

after a bit of searching, you might want to look at this conversation since it’s the same error as what you’re encountering, it’s specifically only happens for groq

there’s one guy there tht suggest to use an edit field node first before passing it

but yeah, try and take a look at it

if it helps please mark this answer as the solution

Thank you so much for your feedback.

I think the workflow you created worked because you have used multimodal instead of just LLM based model. Thus the output is inferred by the multimodal and provided.

The challenge here is:

  • We have to use LLM (multimodal is okay ) which must use a HTTP request tool
  • The Agent should call the HTTP request tool by passing the input image. for testing I am using object detection API from hugging face.

Thanks again for the reference post I will try the suggestion mentioned in the post