Form submission and binary data send to a Gemini

I’m trying to set up a workflow where a form submission triggers the processing of both JSON data and an attached binary file. The goal is to send the image file to Gemini’s document analysis node and then forward the resulting CSV to Telegram. However, I’m struggling to properly extract the binary file from the form submission. When sending it to Gemini, I’ve encountered various errors, including `binaryPropertyNames.split is not a function` and issues with base64 encoding. Some research suggests this might be related to file handling in memory, potentially requiring Docker configuration adjustments. Still, I’m not convinced that’s the root cause. Has anyone successfully implemented a similar workflow and can offer guidance or insights? Any assistance would be greatly appreciated.

Describe the problem/error/question

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

1 Like

@Vicesta your mistake is in trying to handle the field as $binary. Simply putting the Take_a_Photo field into Gemini’s Input Data Field Name(s), configured as Binary File(s), should work.

Hope this helps and Kindly mark as the solution if this was helpful.

2 Likes

Actually saw the mistakes, thanks once again.

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