Add variable support for authorization fields in tool nodes #5112

Closed
opened 2026-02-21 18:09:26 -05:00 by yindo · 3 comments
Owner

Originally created by @SpyrexDE on GitHub (Aug 19, 2024).

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.

We are currently trying to create a customer chat bot that can see the customers order history and give recommendations based on that. This is impossible without user-specific api authorization (or making each user's order history publicly available).

2. Additional context or comments

It would already be sufficient if one could pass environment variables during an API call, which could then be used in tool nodes.

3. Can you help us with this feature?

  • I am interested in contributing to this feature.
Originally created by @SpyrexDE on GitHub (Aug 19, 2024). ### 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. We are currently trying to create a customer chat bot that can see the customers order history and give recommendations based on that. This is impossible without user-specific api authorization (or making each user's order history publicly available). ### 2. Additional context or comments It would already be sufficient if one could pass environment variables during an API call, which could then be used in tool nodes. ### 3. Can you help us with this feature? - [ ] I am interested in contributing to this feature.
yindo added the 💪 enhancement label 2026-02-21 18:09:26 -05:00
yindo closed this issue 2026-02-21 18:09:26 -05:00
Author
Owner

@crazywoola commented on GitHub (Aug 19, 2024):

Conversation Variables would do the trick. See example DSL here.
Patient Intake Chatbot.yml.zip

@crazywoola commented on GitHub (Aug 19, 2024): Conversation Variables would do the trick. See example DSL here. [Patient Intake Chatbot.yml.zip](https://github.com/user-attachments/files/16667109/Patient.Intake.Chatbot.yml.zip)
Author
Owner

@SpyrexDE commented on GitHub (Aug 20, 2024):

Conversation Variables would do the trick. See example DSL here. Patient Intake Chatbot.yml.zip

The demo you sent is unrelated to user-specific authentication of tools. It does not even contain any tool nodes.
The problem we have is that conversation variables can't be used for API authentication except using a HTTPRequest node because API-keys for tools are globally managed so they do not accept context dependent flow variables.

@SpyrexDE commented on GitHub (Aug 20, 2024): > Conversation Variables would do the trick. See example DSL here. [Patient Intake Chatbot.yml.zip](https://github.com/user-attachments/files/16667109/Patient.Intake.Chatbot.yml.zip) The demo you sent is unrelated to user-specific authentication of tools. It does not even contain any tool nodes. The problem we have is that conversation variables **can't** be used for API authentication except using a HTTPRequest node because API-keys for tools are globally managed so they do not accept context dependent flow variables.
Author
Owner

@SuMiaoALi commented on GitHub (Oct 31, 2024):

Conversation Variables would do the trick. See example DSL here. Patient Intake Chatbot.yml.zipConversation Variables 可以解决问题。在此处查看示例 DSL。患者接收Chatbot.yml.zip

The demo you sent is unrelated to user-specific authentication of tools. It does not even contain any tool nodes.您发送的演示与特定于用户的工具身份验证无关。它甚至不包含任何工具节点。 The problem we have is that conversation variables can't be used for API authentication except using a HTTPRequest node because API-keys for tools are globally managed so they do not accept context dependent flow variables.我们面临的问题是,除非使用 HTTPRequest 节点,否则对话变量不能用于 API 身份验证,因为工具的 API 密钥是全局管理的,因此它们不接受上下文相关的流变量。

Any progress? I have the same problems.I also need variables for API_KEY in custom tools. But use HTTP Node instead is terrible.

@SuMiaoALi commented on GitHub (Oct 31, 2024): > > Conversation Variables would do the trick. See example DSL here. [Patient Intake Chatbot.yml.zip](https://github.com/user-attachments/files/16667109/Patient.Intake.Chatbot.yml.zip)Conversation Variables 可以解决问题。在此处查看示例 DSL。[患者接收Chatbot.yml.zip](https://github.com/user-attachments/files/16667109/Patient.Intake.Chatbot.yml.zip) > > The demo you sent is unrelated to user-specific authentication of tools. It does not even contain any tool nodes.您发送的演示与特定于用户的工具身份验证无关。它甚至不包含任何工具节点。 The problem we have is that conversation variables **can't** be used for API authentication except using a HTTPRequest node because API-keys for tools are globally managed so they do not accept context dependent flow variables.我们面临的问题是,除非使用 HTTPRequest 节点,否则对话变量**不能**用于 API 身份验证,因为工具的 API 密钥是全局管理的,因此它们不接受上下文相关的流变量。 Any progress? I have the same problems.I also need variables for API_KEY in custom tools. But use HTTP Node instead is terrible.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#5112