Skip to main content

Introduction

Triggers are available for workflow applications only.
A trigger is a type of Start node that enables your workflow to run automatically—on a schedule or in response to events from external systems (e.g., GitHub, Gmail, or your own internal systems)—rather than waiting for active initiation from a user or an API call. Triggers are ideal for automating repetitive tasks or integrating your workflow with third-party applications to achieve automatic data synchronization and processing. A workflow can have multiple triggers running in parallel. You can also build several independent workflows on the same canvas, each starting with its own triggers.
The Sandbox plan supports up to 2 triggers per workflow. Upgrade to add more.
The trigger source for each workflow execution is displayed in the Logs section.
On Dify Cloud, trigger events (workflow executions initiated by triggers) are subject to a quota that varies by plan. For details, see the Plan Comparison.The workspace owner and admins can check the remaining quota in Settings > Billing.

Trigger Types

  • Schedule Trigger
    • Runs your workflow at specified times or intervals.
    • Example: Automatically generate a daily sales report every morning at 9 AM and email it to your team.
  • Plugin Trigger
    • Runs your workflow when a specific event occurs in an external system, via an event subscription through a trigger plugin.
    • Example: Automatically analyze and archive new messages in a specific Slack channel via a subscription to the New Message in Channel event through a Slack trigger plugin.
  • Webhook Trigger
    • Runs your workflow when a specific event occurs in an external system via a custom webhook.
    • Example: Automatically process new orders in response to an HTTP request containing the order details from your e-commerce platform.
Both plugin triggers and webhook triggers make your workflow event-driven. Here’s how to choose:
  1. Use a plugin trigger when a trigger plugin is available for your target external system. You can simply subscribe to the supported events.
  2. Use a webhook trigger when no corresponding plugin exists or when you need to capture events not supported by existing plugins. In such cases, you’ll need to set up custom webhooks in the external system.

Enable or Disable Triggers

In the Quick Settings side menu, you can enable or disable published triggers. Disabled triggers do not initiate workflow execution.
Only published triggers appear in Quick Settings. If you don’t see an added trigger listed, ensure it has been published first.
Enable or Disable Published Triggers

Test Multiple Triggers

When a workflow has multiple triggers, you can click Test Run > Run all triggers to test them at once. The first trigger that activates will initiate the workflow, and the others will then be ignored. After you click Run all triggers:
  • Schedule triggers will run at the next scheduled execution time.
  • Plugin triggers will listen for subscribed events.
  • Webhook triggers will listen for external HTTP requests.