dify - 💡(How to fix) Fix [Bug] Knowledge Base workflow: Code node Array[Object] output not selectable in Knowledge Base node's qa_structure

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
RAW_BUFFERClick to expand / collapse

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.14.2

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. Create a Knowledge Base Creation Workflow (go to Knowledge Base → Settings → Workflow Integration → Create Workflow).
  2. Add a Code node to the workflow.
    • Define an output variable in the node configuration:
      • Name: qa_data
      • Type: Array[Object]
    • Write the following Python code:
      def main():
          return {
              "qa_data": [
                  {"question": "What is Dify?", "answer": "Dify is an LLM application development platform."}
              ]
          }

✔️ Expected Behavior

The qa_structure field of the Knowledge Base node should be able to select and use an Array[Object] typed output variable from a preceding Code node. This would allow dynamic QA data generated by code to be directly ingested into a Knowledge Base.

❌ Actual Behavior

When trying to select a variable for the qa_structure field, the variable picker does not show any output from the Code node. The variable qa_data (defined as Array[Object]) is missing, making it impossible to pass generated QA pairs to the Knowledge Base node.

<img width="1079" height="608" alt="Image" src="https://github.com/user-attachments/assets/f21bf0b6-f397-434e-9804-b67cfb213644" />

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

dify - 💡(How to fix) Fix [Bug] Knowledge Base workflow: Code node Array[Object] output not selectable in Knowledge Base node's qa_structure