Script Node in Custom Workflow Cannot Access Properties of Custom File Input Variable—Input Argument Returns NULL #6249

Closed
opened 2026-02-21 18:14:43 -05:00 by yindo · 3 comments
Owner

Originally created by @nne998 on GitHub (Oct 22, 2024).

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.10

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  • Create a custom workflow.
  • Add a custom file (image) input variable in the "start" node.
  • Add a script node and set the image's URL property as an input argument.
  • Print the input argument for debugging.

Checkout the example DSL exported below:
test.yml.zip

screenshop

image image image

✔️ Expected Behavior

The input arg is the value of the selected property

Actual Behavior

The input arg value is null.

Originally created by @nne998 on GitHub (Oct 22, 2024). ### Self Checks - [X] This is only for bug report, if you would like to ask a question, please head to [Discussions](https://github.com/langgenius/dify/discussions/categories/general). - [X] I have searched for existing issues [search for existing issues](https://github.com/langgenius/dify/issues), including closed ones. - [X] I confirm that I am using English to submit this report (我已阅读并同意 [Language Policy](https://github.com/langgenius/dify/issues/1542)). - [X] [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:) - [X] Please do not modify this template :) and fill in all the required fields. ### Dify version 0.10 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce - Create a custom workflow. - Add a custom file (image) input variable in the "start" node. - Add a script node and set the image's URL property as an input argument. - Print the input argument for debugging. Checkout the example DSL exported below: [test.yml.zip](https://github.com/user-attachments/files/17484107/test.yml.zip) #### screenshop <img width="721" alt="image" src="https://github.com/user-attachments/assets/8476ad38-bc3a-48aa-aa4a-7012cdce9213"> <img width="864" alt="image" src="https://github.com/user-attachments/assets/0f995d59-da05-44f4-9340-07497a5c1e0a"> <img width="427" alt="image" src="https://github.com/user-attachments/assets/a84f9363-eef4-457b-bd31-2a6696699a80"> ### ✔️ Expected Behavior The input arg is the value of the selected property ### ❌ Actual Behavior The input arg value is null.
yindo added the 🐞 bug label 2026-02-21 18:14:43 -05:00
yindo closed this issue 2026-02-21 18:14:44 -05:00
Author
Owner

@crazywoola commented on GitHub (Oct 22, 2024):

Some node can not read files.

@crazywoola commented on GitHub (Oct 22, 2024): Some node can not read files.
Author
Owner

@dosubot[bot] commented on GitHub (Oct 22, 2024):

I found some similar issues and discussions related to custom variables in Dify workflows:

  1. Discussion: Error in item: Invalid variable - This discussion is unsolved and might be related to issues with variable handling in workflows [1].

  2. Issue: Some variables are lost after the Parameter Extraction node - This issue is closed, but it was related to variables not being retained correctly in workflows. The suggested solution was to set up two Direct Reply nodes to output the content in the Parameter Extraction node [2].

  3. Issue: Parameters are not being sent with the Custom Tool - This issue is also closed. The problem was related to input parameters not being sent correctly due to the handling of variable input values. The solution involved ensuring that the onChange function correctly updates the state with new values and types [3].

For your specific issue with the custom "File" variable not reading properties in workflows, it might be helpful to check if the variable is correctly defined and referenced in your workflow. Ensure that the file variable is properly set up in the "Start" node and that any necessary parsing or extraction nodes are correctly configured. If the issue persists, reviewing the related discussions and issues might provide additional insights or solutions.

To continue talking to Dosu, mention @dosu.

@dosubot[bot] commented on GitHub (Oct 22, 2024): <!-- Answer --> I found some similar issues and discussions related to custom variables in Dify workflows: 1. **Discussion**: [Error in item: Invalid variable](https://github.com/langgenius/dify/discussions/8611) - This discussion is unsolved and might be related to issues with variable handling in workflows <sup>[[1]](https://github.com/langgenius/dify/discussions/8611)</sup>. 2. **Issue**: [Some variables are lost after the Parameter Extraction node](https://github.com/langgenius/dify/issues/5393) - This issue is closed, but it was related to variables not being retained correctly in workflows. The suggested solution was to set up two Direct Reply nodes to output the content in the Parameter Extraction node <sup>[[2]](https://github.com/langgenius/dify/issues/5393)</sup>. 3. **Issue**: [Parameters are not being sent with the Custom Tool](https://github.com/langgenius/dify/issues/5014) - This issue is also closed. The problem was related to input parameters not being sent correctly due to the handling of variable input values. The solution involved ensuring that the `onChange` function correctly updates the state with new values and types <sup>[[3]](https://github.com/langgenius/dify/issues/5014)</sup>. For your specific issue with the custom "File" variable not reading properties in workflows, it might be helpful to check if the variable is correctly defined and referenced in your workflow. Ensure that the file variable is properly set up in the "Start" node and that any necessary parsing or extraction nodes are correctly configured. If the issue persists, reviewing the related discussions and issues might provide additional insights or solutions. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.*
Author
Owner

@nne998 commented on GitHub (Oct 22, 2024):

Some node can not read files.

not file ,is the file 's props

@nne998 commented on GitHub (Oct 22, 2024): > Some node can not read files. not file ,is the file 's props
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#6249