Skip to content

Workflow API ignores default values for optional input variables #28546

@importcjj

Description

@importcjj

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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, otherwise it will be closed.
  • 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :)
  • Please do not modify this template :) and fill in all the required fields.

Dify version

1.10.0

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Create a workflow with a start node
  2. Add an optional input variable with a default value (e.g., text input with default "hello")
  3. Call the workflow API without providing that optional field
  4. The variable receives null instead of the default value "hello"

✔️ Expected Behavior

Optional workflow input variables should use their configured default values when not provided in the API request.

❌ Actual Behavior

Optional variables receive null when omitted from the API request, ignoring the default value configuration.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions