user variable name issue #16041

Closed
opened 2026-02-21 19:24:26 -05:00 by yindo · 5 comments
Owner

Originally created by @asrguru20 on GitHub (Aug 11, 2025).

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

Dify version

1.7.1

Cloud or Self Hosted

Cloud

Steps to reproduce

  1. create an agent app or ChatFlow
  2. use Embed on website via iFrame copy it and us ein your body tag of your website
  3. un comment the userVariables
    : {
    // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE',
    name: 'SAMPLE-NAME',
    },

But in the the agent app Orchestrate there is no visible variable for "name" only I see system variable like sys.user_id

Note: I only want to use user variable not uncomment // system variable

✔️ Expected Behavior

To see the given string value for user varaible name

Actual Behavior

I cannot see the user variable name in the app back end

Originally created by @asrguru20 on GitHub (Aug 11, 2025). ### 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 have read the [Contributing Guide](https://github.com/langgenius/dify/blob/main/CONTRIBUTING.md) and [Language Policy](https://github.com/langgenius/dify/issues/1542). - [x] 【中文用户 & Non English User】请使用英语提交,否则会被关闭 :) - [x] Please do not modify this template :) and fill in all the required fields. - [x] I confirm that I am using English to submit this report, otherwise it will be closed. ### Dify version 1.7.1 ### Cloud or Self Hosted Cloud ### Steps to reproduce 1. create an agent app or ChatFlow 2. use Embed on website via iFrame copy it and us ein your body tag of your website 3. un comment the userVariables : { // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE', name: 'SAMPLE-NAME', }, But in the the agent app Orchestrate there is no visible variable for "name" only I see system variable like sys.user_id Note: I only want to use user variable not uncomment // system variable ### ✔️ Expected Behavior To see the given string value for user varaible name ### ❌ Actual Behavior I cannot see the user variable name in the app back end
yindo closed this issue 2026-02-21 19:24:26 -05:00
Author
Owner

@crazywoola commented on GitHub (Aug 11, 2025):

: {
// avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE',
name: 'SAMPLE-NAME',
},

This only affects the avatar and it's tag name in the chat bubble.

Image

For example:, it(userVariables) won't be passed to backend for processing.

Location key value
inputs name NAME
inputs long_name banana loooong
userVariables name N/A
systemVariables user_id banana
systemVariables conversation_id 039aaabe-0a1d-4758-a135-a0c30ac36a40

Please see the example code below.

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>My Tailwind Site</title>
    <!-- Include Tailwind CSS via CDN -->
    <script src="https://cdn.tailwindcss.com"></script>
</head>

<body class="bg-gray-100">
    <div class="container mx-auto px-4 py-8">
        <header class="text-center mb-8">
            <h1 class="text-4xl font-bold text-gray-900">Welcome</h1>
            <p class="text-gray-600">A simple Tailwind CSS template</p>
        </header>
        <script>
            window.difyChatbotConfig = {
                token: 'Hmz0CVUSKNmKzEln',
                isDev: true,
                baseUrl: 'http://127.0.0.1:3000',
                inputs: {
                    // You can define the inputs from the Start node here
                    // key is the variable name
                    // e.g.
                    name: "NAME"
                },
                systemVariables: {
                    user_id: 'banana',
                    // conversation_id: 'YOU CAN DEFINE CONVERSATION ID HERE, IT MUST BE A VALID UUID',
                },
                userVariables: {
                    // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE',
                    // name: 'YOU CAN DEFINE USER NAME HERE',
                },
            }
        </script>
        <script src="http://127.0.0.1:3000/embed.min.js" id="Hmz0CVUSKNmKzEln" defer>
        </script>
        <style>
            #dify-chatbot-bubble-button {
                background-color: #1C64F2 !important;
            }

            #dify-chatbot-bubble-window {
                width: 24rem !important;
                height: 40rem !important;
            }
        </style>
    </div>
</body>

</html>
@crazywoola commented on GitHub (Aug 11, 2025): ``` : { // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE', name: 'SAMPLE-NAME', }, ``` This only affects the avatar and it's tag name in the chat bubble. <img width="942" height="1430" alt="Image" src="https://github.com/user-attachments/assets/d41b60be-c9da-4485-a1dc-fdd22a77ad00" /> For example:, it(userVariables) won't be passed to backend for processing. | Location | key | value | |---------|-----|---------| | inputs | name | NAME | | inputs | long_name | banana loooong | | userVariables | name | N/A | | systemVariables | user_id | banana | | systemVariables | conversation_id | 039aaabe-0a1d-4758-a135-a0c30ac36a40 | Please see the example code below. ```html <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>My Tailwind Site</title> <!-- Include Tailwind CSS via CDN --> <script src="https://cdn.tailwindcss.com"></script> </head> <body class="bg-gray-100"> <div class="container mx-auto px-4 py-8"> <header class="text-center mb-8"> <h1 class="text-4xl font-bold text-gray-900">Welcome</h1> <p class="text-gray-600">A simple Tailwind CSS template</p> </header> <script> window.difyChatbotConfig = { token: 'Hmz0CVUSKNmKzEln', isDev: true, baseUrl: 'http://127.0.0.1:3000', inputs: { // You can define the inputs from the Start node here // key is the variable name // e.g. name: "NAME" }, systemVariables: { user_id: 'banana', // conversation_id: 'YOU CAN DEFINE CONVERSATION ID HERE, IT MUST BE A VALID UUID', }, userVariables: { // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE', // name: 'YOU CAN DEFINE USER NAME HERE', }, } </script> <script src="http://127.0.0.1:3000/embed.min.js" id="Hmz0CVUSKNmKzEln" defer> </script> <style> #dify-chatbot-bubble-button { background-color: #1C64F2 !important; } #dify-chatbot-bubble-window { width: 24rem !important; height: 40rem !important; } </style> </div> </body> </html> ```
Author
Owner

@asrguru20 commented on GitHub (Aug 11, 2025):

: {
// avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE',
name: 'SAMPLE-NAME',
},

This only affects the avatar and it's tag name in the chat bubble.

Image For example:, it(userVariables) won't be passed to backend for processing.

Location key value
inputs name NAME
inputs long_name banana loooong
userVariables name N/A
systemVariables user_id banana
systemVariables conversation_id 039aaabe-0a1d-4758-a135-a0c30ac36a40
Please see the example code below.

<html lang="en"> <head> <script src="https://cdn.tailwindcss.com"></script> </head>

Welcome

A simple Tailwind CSS template

<script> window.difyChatbotConfig = { token: 'Hmz0CVUSKNmKzEln', isDev: true, baseUrl: 'http://127.0.0.1:3000', inputs: { // You can define the inputs from the Start node here // key is the variable name // e.g. name: "NAME" }, systemVariables: { user_id: 'banana', // conversation_id: 'YOU CAN DEFINE CONVERSATION ID HERE, IT MUST BE A VALID UUID', }, userVariables: { // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE', // name: 'YOU CAN DEFINE USER NAME HERE', }, } </script> <script src="http://127.0.0.1:3000/embed.min.js" id="Hmz0CVUSKNmKzEln" defer> </script> <style> #dify-chatbot-bubble-button { background-color: #1C64F2 !important; }
        #dify-chatbot-bubble-window {
            width: 24rem !important;
            height: 40rem !important;
        }
    </style>
</div>
</html>

Hi dear Dev @crazywoola I need a help after Dify v 1.6.0 The change for systemVariables by adding authentication method made me NOT update to Dify latetst version because up to Dify 1.6.0 I just simply add a value for user_id in the system variable of iframe , I used this to make my chat bot to underestand if the my wordpress usser is logged in or not and if yes the chat bot via HTTP request can get its name and etc Now I Dont know how the new version of Dify works for this subject

I used a PHP for the iframe to automatically replace current user ID of wordpress in the value of user_id of iframe now this method do not work
Can i make the new dify to act like before or if the new method can be work can you explain

I would reallly really appreciate if you help me love crazywoola

@asrguru20 commented on GitHub (Aug 11, 2025): > ``` > : { > // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE', > name: 'SAMPLE-NAME', > }, > ``` > > This only affects the avatar and it's tag name in the chat bubble. > > <img alt="Image" width="942" height="1430" src="https://private-user-images.githubusercontent.com/100913391/476438535-d41b60be-c9da-4485-a1dc-fdd22a77ad00.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NTQ4OTEwMjMsIm5iZiI6MTc1NDg5MDcyMywicGF0aCI6Ii8xMDA5MTMzOTEvNDc2NDM4NTM1LWQ0MWI2MGJlLWM5ZGEtNDQ4NS1hMWRjLWZkZDIyYTc3YWQwMC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjUwODExJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI1MDgxMVQwNTM4NDNaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0wMmY2ZWRiOGVhYTc2MTRjNzA2MGU5OTExNTVkMWE0NzQ1MTIwZWFhN2NkMWFlZjA5ZDdmOTk2NTkzYThhMjA2JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.B7O4Wp-BnASscgPuNd5AQ-Z5246EFuLUOsnl_OiD0kQ"> > For example:, it(userVariables) won't be passed to backend for processing. > > Location key value > inputs name NAME > inputs long_name banana loooong > userVariables name N/A > systemVariables user_id banana > systemVariables conversation_id 039aaabe-0a1d-4758-a135-a0c30ac36a40 > Please see the example code below. > > <!DOCTYPE html> > <html lang="en"> > > <head> > <meta charset="UTF-8"> > <meta name="viewport" content="width=device-width, initial-scale=1.0"> > <title>My Tailwind Site</title> > <!-- Include Tailwind CSS via CDN --> > <script src="https://cdn.tailwindcss.com"></script> > </head> > > <body class="bg-gray-100"> > <div class="container mx-auto px-4 py-8"> > <header class="text-center mb-8"> > <h1 class="text-4xl font-bold text-gray-900">Welcome</h1> > <p class="text-gray-600">A simple Tailwind CSS template</p> > </header> > <script> > window.difyChatbotConfig = { > token: 'Hmz0CVUSKNmKzEln', > isDev: true, > baseUrl: 'http://127.0.0.1:3000', > inputs: { > // You can define the inputs from the Start node here > // key is the variable name > // e.g. > name: "NAME" > }, > systemVariables: { > user_id: 'banana', > // conversation_id: 'YOU CAN DEFINE CONVERSATION ID HERE, IT MUST BE A VALID UUID', > }, > userVariables: { > // avatar_url: 'YOU CAN DEFINE USER AVATAR URL HERE', > // name: 'YOU CAN DEFINE USER NAME HERE', > }, > } > </script> > <script src="http://127.0.0.1:3000/embed.min.js" id="Hmz0CVUSKNmKzEln" defer> > </script> > <style> > #dify-chatbot-bubble-button { > background-color: #1C64F2 !important; > } > > #dify-chatbot-bubble-window { > width: 24rem !important; > height: 40rem !important; > } > </style> > </div> > </body> > > </html> Hi dear Dev @crazywoola I need a help after Dify v 1.6.0 The change for systemVariables by adding authentication method made me NOT update to Dify latetst version because up to Dify 1.6.0 I just simply add a value for user_id in the system variable of iframe , I used this to make my chat bot to underestand if the my wordpress usser is logged in or not and if yes the chat bot via HTTP request can get its name and etc Now I Dont know how the new version of Dify works for this subject I used a PHP for the iframe to automatically replace current user ID of wordpress in the value of user_id of iframe now this method do not work Can i make the new dify to act like before or if the new method can be work can you explain I would reallly really appreciate if you help me love crazywoola
Author
Owner

@dosubot[bot] commented on GitHub (Aug 11, 2025):

User variables like name passed via iFrame embedding in Dify are only used for frontend customization—such as displaying the user's name or avatar in the chat UI. They are not sent to or stored in the backend, so you won't see them in the Orchestrate interface or app backend. This is intentional and not a bug; only system variables (like sys.user_id) are available in the backend by default see details.

If you want a user variable (like name) to be visible or accessible in the backend or Orchestrate, you need to explicitly define it as a prompt/input variable in your app's configuration (user_input_form). Once defined, it will show up in the backend and can be used in workflows and logs code reference.

Let me know if you need steps or an example for configuring this!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

@dosubot[bot] commented on GitHub (Aug 11, 2025): <!-- Answer --> User variables like `name` passed via iFrame embedding in Dify are only used for frontend customization—such as displaying the user's name or avatar in the chat UI. They are not sent to or stored in the backend, so you won't see them in the Orchestrate interface or app backend. This is intentional and not a bug; only system variables (like `sys.user_id`) are available in the backend by default [see details](https://github.com/langgenius/dify/issues/21768). If you want a user variable (like `name`) to be visible or accessible in the backend or Orchestrate, you need to explicitly define it as a prompt/input variable in your app's configuration (`user_input_form`). Once defined, it will show up in the backend and can be used in workflows and logs [code reference](https://github.com/langgenius/dify/blob/0c5e66bccbee9730b8c4bc164efa99a754615e2d/api/core/app/app_config/easy_ui_based_app/variables/manager.py). Let me know if you need steps or an example for configuring this! <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).* --- <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/bc4c82ba-b1b4-4a3f-99fb-341c9b74fc65?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/bc4c82ba-b1b4-4a3f-99fb-341c9b74fc65?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/bc4c82ba-b1b4-4a3f-99fb-341c9b74fc65?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/bc4c82ba-b1b4-4a3f-99fb-341c9b74fc65?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/bc4c82ba-b1b4-4a3f-99fb-341c9b74fc65?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/bc4c82ba-b1b4-4a3f-99fb-341c9b74fc65?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/bc4c82ba-b1b4-4a3f-99fb-341c9b74fc65?feedback_type=other)</sup>&nbsp;&nbsp;[![Chat with Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/6088a4f4-073a-43f3-b3d4-4f06fb0c05a0/ask?utm_source=github)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/langgenius/dify/issues/23719)
Author
Owner

@crazywoola commented on GitHub (Aug 11, 2025):

@asrguru20 Hi, this should be resolved in v1.7.2, I did saw your last issue report. We will release it today.

@crazywoola commented on GitHub (Aug 11, 2025): @asrguru20 Hi, this should be resolved in v1.7.2, I did saw your last issue report. We will release it today.
Author
Owner

@asrguru20 commented on GitHub (Aug 11, 2025):

@asrguru20 Hi, this should be resolved in v1.7.2, I did saw your last issue report. We will release it today.

WOOW such a good news I so happy Dear dev @crazywoola

@asrguru20 commented on GitHub (Aug 11, 2025): > [@asrguru20](https://github.com/asrguru20) Hi, this should be resolved in v1.7.2, I did saw your last issue report. We will release it today. WOOW such a good news I so happy Dear dev @crazywoola
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#16041