Uploading an image into agent workflow

Can I upload a pictures into the agent to “activate” it and it will inventory what it sees in the image as its first step? If yes, how do I do this?

Hi @ekealoha,

That’s possible. You can trigger Agents through the API, a Webhook, email, or integrations like Zapier, Make, etc.

It’d help if you could share a bit more detail about your setup. How do you imagine the process working, and where are the images hosted?

Good evening @Alex_MindStudio,

I’m wiring a locally hosted n8n workflow to a MindStudio agent. the goal is to pick up a JPG, send it to the agent, get back analysis. Text variables pass fine, but the image isn’t being used (the response always references the same default URL, regardless of upload).

What I’m sending (JSON body), per the n8n + MindStudio guide:

{
  "workflow": "API.flow",
  "appId": "xxxxxxxxx",
  "variables": {
    "location": "Minneapolis, MN",
    "roofImage": "{{$json.roofImg}}",    //base64 string
    "filename": "test1"
  },
  "includeBillingCost": true
}

Headers: Authorization: Bearer <redacted>, Accept: application/json.

Questions:

  1. For image inputs, does the API expect base64 inside variables.image, a data-URI (data:image/jpeg;base64,...), or multipart/form-data with a file field?

  2. Is the field name for the image required to match the launch variable name exactly (e.g., roofImage vs imageBase64)?

  3. Any size limits for variables (max base64 length / payload size)? If so, recommended approach (resize, presigned URL, etc.)?

Notes

  • With base64 present, status is 200 but the agent still uses a static image URL in the result.

  • I can switch to multipart if that’s the intended pattern—just need the exact field names.

Thanks in advance for the help!

Hey, which same static url is being referenced? Maybe it’s something with n8n?

You should be able to pass a base64 string as a variable.

And then inside the workflow if you want to upload it to the MindStudio CDN you can do it in a custom function like this:

const url = await ai.uploadFile(base64String, ‘image/png’, ‘base64’);

Limit should be around 10MB if I recall correctly. If the payload is larger, you can resize the image.

Thanks so much for the response, Marko — that explanation actually helped me narrow down what I think is happening.

After digging through my MindStudio workflow, I think I found the root cause. I have 2 sub-processes (imgAnalysis and weatherAnalysis) that weren’t configured with launch variables, so even though n8n was probably passing the base64 image correctly, those subflows didn’t receive it. I’m guessing they just reused the last values they had in memory — which explains why every request kept returning the same static image URL from an older test.

I made some initial changes trying to get the launch variable set up correctly so I’ll test it today and see if that works.

Thanks again!