Triggers are available for workflow applications only.
Pull Request, Push, and Issue. Subscribe to Pull Request and add its trigger, and the workflow runs whenever someone opens a pull request in the chosen repository.
Add and Configure an Integration Trigger
- On the workflow canvas, right-click and select Add Node > Start, then choose the integration trigger event you want to start the workflow. To find more integrations, search the Marketplace.
- Select an existing subscription or create a new one. The trigger needs a subscription to receive events.
- Configure any other required settings.
The output variables of an integration trigger are defined by the integration and can’t be modified.
Create a Subscription
A subscription is a webhook that listens for events from an external system. Each integration supports up to 10 subscriptions per workspace.What is a webhook?
What is a webhook?
A webhook lets one system send real-time data to another. When an event occurs, the source system packages the details into an HTTP request and sends it to a URL the destination system provides.
Prerequisite: set the callback URL baseDify builds each subscription’s callback URL from the
TRIGGER_URL environment variable plus an integration-specific path. The default http://localhost is unreachable by external systems, so set TRIGGER_URL to a public domain or IP they can reach, then restart Dify before creating subscriptions.- Automatic: You pick the events to subscribe to, and Dify creates the webhook in the external system for you. This requires prior authorization, through OAuth or an API key, so Dify can set it up on your behalf.
- Manual: You create the webhook yourself using the callback URL Dify provides. No authorization needed.
- OAuth (Automatic)
- 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 Dify provides.
- Back in Dify, enter the application’s client ID and client secret, then click Save and Authorize.
Once saved, the same credentials can be reused for future subscriptions.
- Name the subscription, select the events to subscribe to, and configure any other required settings.
- Click Create.
