Skip to content

Enhancing Workflow with Loop and Sleep Nodes for Repeated Execution and Interval Control #12354

Description

@Woo0ood

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 would like to have the capability to repeatedly request an HTTP interface or make multiple calls to an LLM within a workflow (or any other process that requires repeated execution to achieve a result). The loop should continue until the returned information meets specific formats or conditions. Additionally, it should be possible to add appropriate intervals between requests.

2. Additional context or comments

To achieve this, we developed Loop and Sleep nodes. The Loop node's logic combines iteration and if-else nodes, allowing it to use internal nodes' output variables to determine whether to exit the loop. Additionally, a maximum iteration limit can be set. The Sleep node pauses execution for a specified duration until the sleep period ends. We seek the official and community stance and suggestions on this new feature. If it receives support from the official team and the community, we will organize this part of the code and submit it to the Dify community.

Loop
Sleep

3. Can you help us with this feature?

  • I am interested in contributing to this feature.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions