How to Receive a User-Uploaded Excel File Inside a Custom Node?

Hi everyone :waving_hand:

I’m trying to build a simple workflow, but I’m running into an issue with how Gumloop handles file inputs.


:bullseye: What I want to do

I want to create a custom node that:

  • Takes an Excel file directly uploaded by the user in the Gumloop interface (drag-and-drop file input at runtime)

  • Reads a specific cell range inside that Excel file

  • Returns the extracted data as JSON

So the node should accept three inputs:

  • excel_file → the actual file object uploaded at runtime

  • sheet_name

  • cell_range


:police_car_light: The issue

When Gumloop auto-generates the node, the “Excel File” input is always forced into a dropdown:

Excel File: Select an option

This dropdown only shows files that were previously uploaded in the builder, not files uploaded by the end-user when the workflow runs.

:backhand_index_pointing_right: But what I need is not to select a file from a list.
I want the node to accept the runtime-uploaded file directly.


:red_question_mark: My question

How can I define a node that:

  • Accepts a file uploaded at runtime (the real file object coming from the user),

  • Instead of forcing me to select a file from a predefined list inside the builder?

I need the input to behave like a normal:

File (uploaded by the user)

—not like a parameter requiring pre-selection from a dropdown.


:wrench: Additional context

I also tried writing a Python node manually using:

def function(excel_file, sheet_name, cell_range):

But when I call:

file_bytes = excel_file.read()

I get:

AttributeError: 'str' object has no attribute 'read'

Which confirms that the file is not passed as a file object but as a string path / ID.


:link: Workflow examples

Here are two links showing the workflow where the problem appears:

:folded_hands: Any help or clarification on how to properly receive a runtime-uploaded file inside a custom node would be greatly appreciated.

Thanks a lot!

Hey @sebastien,

I think the issue you’re running into is that the file input on your custom node is currently set up as a static file selector, which causes it to show as a dropdown.

If you want the node to accept a file uploaded at runtime, you’ll need to change the input type:

  1. Hover over your custom node

  2. Click Configure Inputs

  3. Enable the File option

Then you can connect your Interface node (or any node that outputs a file) directly to your custom node, and the uploaded file will be passed in dynamically.

Wow, thank you so much for this — that was exactly the issue!
I had no idea the file input needed to be switched from the static selector to the dynamic File type in the configuration panel.

Just tested it and now the runtime-uploaded Excel file is correctly passed into my custom node :tada:
Huge thanks for the clear steps, this completely unblocked my workflow.

Really appreciate it! :folded_hands:

1 Like

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