Add Support for Passing Variables via URL in Input Fields of Web UI #12005

Closed
opened 2026-02-21 19:05:14 -05:00 by yindo · 8 comments
Owner

Originally created by @alienwaredream on GitHub (Mar 23, 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 this report (我已阅读并同意 Language Policy).
  • [FOR CHINESE USERS] 请务必使用英文提交 Issue,否则会被关闭。谢谢!:)
  • Please do not modify this template :) and fill in all the required fields.

1. Is this request related to a challenge you're experiencing? Tell me about your story.

When integrating Dify's workflow with third - party systems using the native chat window Web UI, I've encountered a significant limitation. Currently, there is no way to pass any parameters from the third - party system to the Web UI. This lack of functionality restricts the flexibility and customization of the interaction between the third - party system and Dify.

In my scenario, I need to populate specific input fields in the Web UI with dynamic data from the third - party system. For example, I might want to pre - fill a user ID or a specific query in an input field based on the user's session in the third - party system.

Consider a situation where a user is coming from a CRM system. I would like to use a URL like https://example.com/path?user_id=123&query=product_info to pass the user ID and the query to the relevant input fields in the Dify Web UI. Enhance the Web UI to parse URL parameters in the format ?key = value. For each parameter, identify the corresponding input field in the UI.

This feature would greatly simplify the integration process. Instead of having users manually enter data in input fields, we can automatically populate them with relevant information from the third - party system. It would also enhance the user experience by reducing the amount of redundant data entry.

I kindly request that the Dify team prioritize adding support for passing variables via URL to populate input fields in the Web UI. This would enable more flexible and efficient integrations with third - party systems.

2. Additional context or comments

No response

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @alienwaredream on GitHub (Mar 23, 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 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. ### 1. Is this request related to a challenge you're experiencing? Tell me about your story. When integrating Dify's workflow with third - party systems using the native chat window Web UI, I've encountered a significant limitation. Currently, there is no way to pass any parameters from the third - party system to the Web UI. This lack of functionality restricts the flexibility and customization of the interaction between the third - party system and Dify. In my scenario, I need to populate specific input fields in the Web UI with dynamic data from the third - party system. For example, I might want to pre - fill a user ID or a specific query in an input field based on the user's session in the third - party system. Consider a situation where a user is coming from a CRM system. I would like to use a URL like https://example.com/path?user_id=123&query=product_info to pass the user ID and the query to the relevant input fields in the Dify Web UI. Enhance the Web UI to parse URL parameters in the format ?key = value. For each parameter, identify the corresponding input field in the UI. This feature would greatly simplify the integration process. Instead of having users manually enter data in input fields, we can automatically populate them with relevant information from the third - party system. It would also enhance the user experience by reducing the amount of redundant data entry. I kindly request that the Dify team prioritize adding support for passing variables via URL to populate input fields in the Web UI. This would enable more flexible and efficient integrations with third - party systems. ### 2. Additional context or comments _No response_ ### 3. Can you help us with this feature? - [x] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 19:05:14 -05:00
yindo closed this issue 2026-02-21 19:05:14 -05:00
Author
Owner

@alienwaredream commented on GitHub (Mar 23, 2025):

Oh, I think I found the method through the docs. The processed input value URL will be as follows: (http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D). First, you need to perform gzip compression and then base64 encoding.

@alienwaredream commented on GitHub (Mar 23, 2025): Oh, I think I found the method through the docs. The processed input value URL will be as follows: (http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D). First, you need to perform gzip compression and then base64 encoding.
Author
Owner

@gesila1997 commented on GitHub (Apr 9, 2025):

哦,我好像在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。

I want to know how you can use this user information as a variable from the chatflow stream

@gesila1997 commented on GitHub (Apr 9, 2025): > 哦,我好像在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。 I want to know how you can use this user information as a variable from the chatflow stream
Author
Owner

@alienwaredream commented on GitHub (Apr 9, 2025):

哦,我好像在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。

I want to know how you can use this user information as a variable from the chatflow stream

Just a user ID information, such as user ID = 123456. First, perform gzip compression and then base64 encoding. Note that the URL /chatbot/ should be used.

@alienwaredream commented on GitHub (Apr 9, 2025): > > 哦,我好像在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。 > > I want to know how you can use this user information as a variable from the chatflow stream Just a user ID information, such as user ID = 123456. First, perform gzip compression and then base64 encoding. Note that the URL /chatbot/ should be used.
Author
Owner

@gesila1997 commented on GitHub (Apr 9, 2025):

哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。

我想知道如何使用这些用户信息作为聊天流中的变量

只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。

Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string

@gesila1997 commented on GitHub (Apr 9, 2025): > > > 哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。 > > > > > > 我想知道如何使用这些用户信息作为聊天流中的变量 > > 只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。 Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string
Author
Owner

@alienwaredream commented on GitHub (Apr 9, 2025):

哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。

我想知道如何使用这些用户信息作为聊天流中的变量

只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。

Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string

在开始节点添加变量,然后第三方系统在调用dify的时候通过url传递这个变量的值

@alienwaredream commented on GitHub (Apr 9, 2025): > > > > 哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。 > > > > > > > > > 我想知道如何使用这些用户信息作为聊天流中的变量 > > > > > > 只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。 > > Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string 在开始节点添加变量,然后第三方系统在调用dify的时候通过url传递这个变量的值
Author
Owner

@gesila1997 commented on GitHub (Apr 9, 2025):

哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。

我想知道如何使用这些用户信息作为聊天流中的变量

只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。

Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string

在开始节点添加变量,然后第三方系统在调用dify的时候通过url传递这个变量的值

那不是每次开始的时候都会显示弹出这个 “New chat setup” 嘛,然后用户他还能更改,比如我设置了他的userid他更改了怎么办

@gesila1997 commented on GitHub (Apr 9, 2025): > > > > > 哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。 > > > > > > > > > > > > 我想知道如何使用这些用户信息作为聊天流中的变量 > > > > > > > > > 只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。 > > > > > > Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string > > 在开始节点添加变量,然后第三方系统在调用dify的时候通过url传递这个变量的值 那不是每次开始的时候都会显示弹出这个 “New chat setup” 嘛,然后用户他还能更改,比如我设置了他的userid他更改了怎么办
Author
Owner

@alienwaredream commented on GitHub (Apr 11, 2025):

哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。

我想知道如何使用这些用户信息作为聊天流中的变量

只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。

Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string

在开始节点添加变量,然后第三方系统在调用dify的时候通过url传递这个变量的值

那不是每次开始的时候都会显示弹出这个 “New chat setup” 嘛,然后用户他还能更改,比如我设置了他的userid他更改了怎么办

那个目前没办法, “开始对话” 这个按钮也没办法隐藏,我看到有issues提了隐藏但是没响应
https://github.com/langgenius/dify/issues/14899

@alienwaredream commented on GitHub (Apr 11, 2025): > > > > > > 哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。 > > > > > > > > > > > > > > > 我想知道如何使用这些用户信息作为聊天流中的变量 > > > > > > > > > > > > 只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。 > > > > > > > > > Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string > > > > > > 在开始节点添加变量,然后第三方系统在调用dify的时候通过url传递这个变量的值 > > 那不是每次开始的时候都会显示弹出这个 “New chat setup” 嘛,然后用户他还能更改,比如我设置了他的userid他更改了怎么办 那个目前没办法, “开始对话” 这个按钮也没办法隐藏,我看到有issues提了隐藏但是没响应 https://github.com/langgenius/dify/issues/14899
Author
Owner

@jy1989 commented on GitHub (May 20, 2025):

哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。

我想知道如何使用这些用户信息作为聊天流中的变量

只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。

Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string

在开始节点添加变量,然后第三方系统在调用dify的时候通过url传递这个变量的值

那不是每次开始的时候都会显示弹出这个 “New chat setup” 嘛,然后用户他还能更改,比如我设置了他的userid他更改了怎么办

那个目前没办法, “开始对话” 这个按钮也没办法隐藏,我看到有issues提了隐藏但是没响应 #14899

魔改 https://github.com/langgenius/webapp-conversation 可以隐藏,但是缺了些功能,不是最新的

@jy1989 commented on GitHub (May 20, 2025): > > > > > > > 哦,我想要在文档里找到了方法,处理后的输入值URL如下:( http://localhost/chatbot/%7Btoken%7D?name=H4sIAKUlmWYA%2FwWAIQ0AAACDsl7gLuiv2PQEUNAuqQUAAAA%3D ),首先需要进行gzip压缩,然后进行base64编码。 > > > > > > > > > > > > > > > > > > 我想知道如何使用这些用户信息作为聊天流中的变量 > > > > > > > > > > > > > > > 只需一个用户ID信息,例如用户ID=123456。先进行gzip压缩,再进行base64编码。注意URL要使用/chatbot/。 > > > > > > > > > > > > Sure, what you're saying is that you only pass in a single userid, such as userid=123456, then compress it and encode it using base64. But how do you use this ID in a workflow, for example, the official workflow's {{sys.userid}}, where the official ID is a random string > > > > > > > > > 在开始节点添加变量,然后第三方系统在调用dify的时候通过url传递这个变量的值 > > > > > > 那不是每次开始的时候都会显示弹出这个 “New chat setup” 嘛,然后用户他还能更改,比如我设置了他的userid他更改了怎么办 > > 那个目前没办法, “开始对话” 这个按钮也没办法隐藏,我看到有issues提了隐藏但是没响应 [#14899](https://github.com/langgenius/dify/issues/14899) 魔改 https://github.com/langgenius/webapp-conversation 可以隐藏,但是缺了些功能,不是最新的
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#12005