Set constants for the output component #22126

Open
opened 2026-02-21 20:15:53 -05:00 by yindo · 3 comments
Owner

Originally created by @mengyunlong on GitHub (Feb 6, 2026).

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • 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.
  • 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.

The variable values in the current output component can only be set to the variables within the workflow. Can they be directly set as string constants?

Image

My usage scenario is to establish a standard interface protocol between Dify's workflow and my program, for example:
{
"status":"success", // success or faild
"message":"error info"
}

Currently, I don't have the option to set constants in the "output" component. I can only achieve this by placing a code component in front of it, which then provides the required variables through Python.

Image

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 @mengyunlong on GitHub (Feb 6, 2026). ### Self Checks - [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] 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, otherwise it will be closed. - [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. The variable values in the current output component can only be set to the variables within the workflow. Can they be directly set as string constants? <img width="402" height="221" alt="Image" src="https://github.com/user-attachments/assets/0bea2301-9c68-4c2b-be9b-a42711032b5a" /> My usage scenario is to establish a standard interface protocol between Dify's workflow and my program, for example: { "status":"success", // success or faild "message":"error info" } Currently, I don't have the option to set constants in the "output" component. I can only achieve this by placing a code component in front of it, which then provides the required variables through Python. <img width="417" height="448" alt="Image" src="https://github.com/user-attachments/assets/72672784-c8b5-4bbc-a969-3a2d3677059d" /> ### 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 20:15:53 -05:00
Author
Owner

@suyash1567 commented on GitHub (Feb 7, 2026):

Hey Can i work on this please?

@suyash1567 commented on GitHub (Feb 7, 2026): Hey Can i work on this please?
Author
Owner

@mengyunlong commented on GitHub (Feb 8, 2026):

Sure, how can I assist you?

@mengyunlong commented on GitHub (Feb 8, 2026): Sure, how can I assist you?
Author
Owner

@suyash1567 commented on GitHub (Feb 8, 2026):

I'm just looking into the code and figuring out how to add the enhancement, assign this issue to me if possible

@suyash1567 commented on GitHub (Feb 8, 2026): I'm just looking into the code and figuring out how to add the enhancement, assign this issue to me if possible
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#22126