Introduction
Triggers are available for Workflow applications only.
Pull Request, Push, and Issue. If you subscribe to the Pull Request event and add the Pull Request plugin trigger to your workflow, it will automatically run whenever someone opens a pull request in the specified repository.
Add and Configure a Plugin Trigger
- On the workflow canvas, right-click and select Add Node > Start, then choose from the available plugin triggers or search for more in Dify Marketplace.
- Select an existing subscription or create a new one.
- Configure any other required settings.
Create a New Subscription
Each subscription is built on a webhook. When you create a subscription, you’re essentially setting up a webhook that listens for events from an external system. A trigger plugin supports creating up to 10 subscriptions per workspace.What is a webhook?
What is a webhook?
A webhook allows one system to automatically send real-time data to another. When a certain event occurs, the source system packages the event details into an HTTP request and sends it to a designated URL provided by the destination system.
Prerequisite: Set the Callback URL Base PrefixDify generates each subscription’s callback URL by combining the
TRIGGER_URL environment variable with a plugin-specific path. The default is http://localhost, which external systems cannot reach.Before creating subscriptions, set TRIGGER_URL in your deployment’s environment to a public domain or IP address that external systems can reach, then restart Dify.- Automatic Creation: You select the events you want to subscribe to, and Dify automatically creates the corresponding webhook in the external system. This requires prior authorization via OAuth or API keys so Dify can handle the webhook setup on your behalf.
- Manual Creation: You create the webhook yourself using the webhook callback URL provided by Dify. No authorization is needed.

- Create with OAuth (Automatic)
- Create with API Key (Automatic)
- Paste URL to Create a New Subscription (Manual)
- Select Create with OAuth > Custom.
- In the external system, create an OAuth application using the callback URL provided by Dify.
-
Back in Dify, enter the client ID and client secret of the newly created OAuth application, then click Save and Authorize.
Once saved, the same client credentials can be reused for future subscriptions.
- Specify the subscription name, select the events you want to subscribe to, and configure any other required settings.
- Click Create.
The displayed Callback URL is used internally by Dify to create the webhook in the external system on your behalf, so you don’t need to take any action with this URL.
