app-selector and parameters for endpoint in plugins #14772

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

Originally created by @nicho2 on GitHub (Jun 20, 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 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.

Dify version

1.4.3

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

1- install cron plugin
2- create workflow with parameters
3- add endpoint in cron plugin (use for example cron string "5 * * * * *" each time second = 5
4- see the workflows logs

✔️ Expected Behavior

parameters take into accound

have :

  {
    "namespace": "workcafe",
    "capacity": 40,
    "sys.files": [],
    "sys.user_id": "DEFAULT-USER",
    "sys.app_id": "8764ddcb-9468-4593-a822-8e55779af267",
    "sys.workflow_id": "0eb9661e-6e53-48a9-885e-09d6da4bc7bb",
    "sys.workflow_run_id": "c93a7fac-4116-43e2-8263-6211a6f98b81"
  }

Actual Behavior

i use the cron plug

I add my workflow with parameter

Image

Image

when the workflow is starting , these parameters are not take into account

{
  "namespace": null,
  "capacity": null,
  "sys.files": [],
  "sys.user_id": "DEFAULT-USER",
  "sys.app_id": "8764ddcb-9468-4593-a822-8e55779af267",
  "sys.workflow_id": "0eb9661e-6e53-48a9-885e-09d6da4bc7bb",
  "sys.workflow_run_id": "c93a7fac-4116-43e2-8263-6211a6f98b81"
}

i thing it's a problem with app-selector :

settings:
  - name: app
    type: app-selector
    required: true
    label:
      en_US: App
      zh_Hans: 应用
      pt_BR: App
      ja_JP: アプリ
.....
Originally created by @nicho2 on GitHub (Jun 20, 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 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. ### Dify version 1.4.3 ### Cloud or Self Hosted Self Hosted (Docker) ### Steps to reproduce 1- install cron plugin 2- create workflow with parameters 3- add endpoint in cron plugin (use for example cron string "5 * * * * *" each time second = 5 4- see the workflows logs ### ✔️ Expected Behavior parameters take into accound have : { "namespace": "workcafe", "capacity": 40, "sys.files": [], "sys.user_id": "DEFAULT-USER", "sys.app_id": "8764ddcb-9468-4593-a822-8e55779af267", "sys.workflow_id": "0eb9661e-6e53-48a9-885e-09d6da4bc7bb", "sys.workflow_run_id": "c93a7fac-4116-43e2-8263-6211a6f98b81" } ### ❌ Actual Behavior i use the cron plug I add my workflow with parameter ![Image](https://github.com/user-attachments/assets/88209153-c036-4593-968a-8f563dfad016) ![Image](https://github.com/user-attachments/assets/6ed2e149-354d-431a-9d30-2a54eaba9177) when the workflow is starting , these parameters are not take into account { "namespace": null, "capacity": null, "sys.files": [], "sys.user_id": "DEFAULT-USER", "sys.app_id": "8764ddcb-9468-4593-a822-8e55779af267", "sys.workflow_id": "0eb9661e-6e53-48a9-885e-09d6da4bc7bb", "sys.workflow_run_id": "c93a7fac-4116-43e2-8263-6211a6f98b81" } i thing it's a problem with app-selector : settings: - name: app type: app-selector required: true label: en_US: App zh_Hans: 应用 pt_BR: App ja_JP: アプリ .....
yindo added the 🐞 bug label 2026-02-21 19:18:42 -05:00
yindo closed this issue 2026-02-21 19:18:42 -05:00
Author
Owner

@dosubot[bot] commented on GitHub (Jun 20, 2025):

This looks like an architectural bug: when a workflow is triggered by the cron plugin, parameters set in the endpoint (including those from the app-selector) are not being passed into the workflow’s runtime context. The app-selector is correctly defined and used for selecting an app, but there’s a missing connection between the plugin endpoint’s settings and the workflow’s parameter initialization during automated (cron) executions. This results in parameters like namespace and capacity being null, even though they are set in the UI and endpoint config.

The relevant logic for parameter extraction and transfer is in the plugin engine, workflow service, and plugin endpoint handling. The workflow runtime expects parameters to be injected at execution, but for scheduled/plugin-triggered runs, this bridge is missing, so only system fields are populated and custom parameters are left null. This does not affect direct/user-triggered runs, which use a different input pathway.

There’s no workaround documented, and this gap is not covered in the docs or recent PRs. The fix would require ensuring that endpoint settings are mapped and injected into the workflow’s variable pool when the cron plugin triggers a run, similar to how user input is handled for manual runs. If you’re comfortable with code, focus on the workflow run creation and parameter mapping logic in the plugin endpoint execution path for a potential patch.

References:

To reply, just mention @dosu.


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

@dosubot[bot] commented on GitHub (Jun 20, 2025): <!-- Answer --> This looks like an architectural bug: when a workflow is triggered by the cron plugin, parameters set in the endpoint (including those from the app-selector) are not being passed into the workflow’s runtime context. The app-selector is correctly defined and used for selecting an app, but there’s a missing connection between the plugin endpoint’s settings and the workflow’s parameter initialization during automated (cron) executions. This results in parameters like `namespace` and `capacity` being null, even though they are set in the UI and endpoint config. The relevant logic for parameter extraction and transfer is in the plugin engine, workflow service, and plugin endpoint handling. The workflow runtime expects parameters to be injected at execution, but for scheduled/plugin-triggered runs, this bridge is missing, so only system fields are populated and custom parameters are left null. This does not affect direct/user-triggered runs, which use a different input pathway. There’s no workaround documented, and this gap is not covered in the docs or recent PRs. The fix would require ensuring that endpoint settings are mapped and injected into the workflow’s variable pool when the cron plugin triggers a run, similar to how user input is handled for manual runs. If you’re comfortable with code, focus on the workflow run creation and parameter mapping logic in the plugin endpoint execution path for a potential patch. References: - [Parameter extraction and initialization in workflow nodes](https://github.com/langgenius/dify/blob/ef20f694b2da4de267abcece006b2b276880ca46/api/core/workflow/nodes/base/node.py) - [Plugin endpoint management and settings](https://github.com/langgenius/dify/blob/ef20f694b2da4de267abcece006b2b276880ca46/api/core/plugin/impl/endpoint.py) - [Parameter type definitions and casting](https://github.com/langgenius/dify/blob/ef20f694b2da4de267abcece006b2b276880ca46/api/core/plugin/entities/parameters.py) <!-- 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/8d75cef5-2527-45bf-a634-fb572a151d88?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/8d75cef5-2527-45bf-a634-fb572a151d88?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/8d75cef5-2527-45bf-a634-fb572a151d88?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/8d75cef5-2527-45bf-a634-fb572a151d88?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/8d75cef5-2527-45bf-a634-fb572a151d88?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/8d75cef5-2527-45bf-a634-fb572a151d88?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/8d75cef5-2527-45bf-a634-fb572a151d88?feedback_type=other)</sup>&nbsp;&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/21302)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#14772