The input variable of the interface I want is of the Array[Array] type, but the output variable type of the dify can only be selected. What should I do? #13471

Closed
opened 2026-02-21 19:12:18 -05:00 by yindo · 1 comment
Owner

Originally created by @liangshuang401 on GitHub (Apr 28, 2025).

Self Checks

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

Provide a description of requested docs changes

The input variable of the interface I want is of the Array[Array] type, but the output variable type of the dify can only be selected. What should I do?

Originally created by @liangshuang401 on GitHub (Apr 28, 2025). ### Self Checks - [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 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. ### Provide a description of requested docs changes The input variable of the interface I want is of the Array[Array] type, but the output variable type of the dify can only be selected. What should I do?
yindo closed this issue 2026-02-21 19:12:18 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Apr 28, 2025):

Hello @liangshuang401! I'm Dosu, a friendly bot here to help you with bugs, answer questions, and assist in becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today?

I found a similar unsolved discussion titled "Unable to Use 'text[array]' Output from Document Extractor in Iteration Step" which might be relevant to your issue [1].

Regarding your question, Dify currently has limitations in handling complex input types like Array[Array]. Only 'text' can be selected as input in tool nodes, and 'json' input types are not yet supported. As a workaround, you can use template nodes to transform JSON into string format before passing them to tool nodes [2].

Additionally, Dify provides built-in functions to assist in converting complex data structures to supported formats using various nodes, including the Code Node. For example, you can convert an array to a text format by joining the elements with a newline character using the following code snippet:

def main(articleSections: list):
    data = articleSections
    return {
        "result": "\n".join(data)
    }

This approach can help you transform your Array[Array] input into a format that Dify can handle [3].

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other

@dosubot[bot] commented on GitHub (Apr 28, 2025): <!-- Greeting --> Hello @liangshuang401! I'm [Dosu](https://dosu.dev), a friendly bot here to help you with bugs, answer questions, and assist in becoming a contributor. I'm here while you wait for a human maintainer. How can I assist you today? <!-- Answer --> I found a similar unsolved discussion titled "[Unable to Use 'text[array]' Output from Document Extractor in Iteration Step](https://github.com/langgenius/dify/discussions/14817)" which might be relevant to your issue <sup>[[1]](https://github.com/langgenius/dify/discussions/14817)</sup>. Regarding your question, Dify currently has limitations in handling complex input types like `Array[Array]`. Only 'text' can be selected as input in tool nodes, and 'json' input types are not yet supported. As a workaround, you can use template nodes to transform JSON into string format before passing them to tool nodes <sup>[[2]](https://github.com/langgenius/dify/issues/14068)</sup>. Additionally, Dify provides built-in functions to assist in converting complex data structures to supported formats using various nodes, including the Code Node. For example, you can convert an array to a text format by joining the elements with a newline character using the following code snippet: ```python def main(articleSections: list): data = articleSections return { "result": "\n".join(data) } ``` This approach can help you transform your `Array[Array]` input into a format that Dify can handle <sup>[[3]](https://github.com/langgenius/dify-docs/blob/main/en/llms.txt)</sup>. <!-- Dosu Comment Footer --> *To continue talking to [Dosu](https://dosu.dev), mention @dosu.* --- <sup>Help Dosu learn! Give it feedback: [Great Response](https://app.dosu.dev/response-feedback/41f51716-d7b4-4cf5-a64f-b5fd3bf7fb03?feedback_type=great_response) | [Irrelevant Answer](https://app.dosu.dev/response-feedback/41f51716-d7b4-4cf5-a64f-b5fd3bf7fb03?feedback_type=irrelevant_answer) | [Incorrect Sources](https://app.dosu.dev/response-feedback/41f51716-d7b4-4cf5-a64f-b5fd3bf7fb03?feedback_type=incorrect_sources) | [Too Verbose](https://app.dosu.dev/response-feedback/41f51716-d7b4-4cf5-a64f-b5fd3bf7fb03?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/41f51716-d7b4-4cf5-a64f-b5fd3bf7fb03?feedback_type=hallucination) | [Bug Report](https://app.dosu.dev/response-feedback/41f51716-d7b4-4cf5-a64f-b5fd3bf7fb03?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/41f51716-d7b4-4cf5-a64f-b5fd3bf7fb03?feedback_type=other)</sup>
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#13471