Instance methods
defineDynamicTrigger()
Getting Started
Concepts
Guides
- Frameworks
- Using the CLI
- Manual setup
- Running your Jobs
- Managing Jobs
- Using the Dashboard
- Using Integrations
- React hooks
- Deployment
- Event Filters
- Zod
- Self hosting
- Contributing
Overview
- Introduction
- Create an Integration
Integrations
SDK
HTTP Reference
Overview
Instance methods
defineDynamicTrigger()
Define a Dynamic Trigger
const dynamicOnIssueOpenedTrigger = client.defineDynamicTrigger({
id: "github-issue-opened",
event: events.onIssueOpened,
source: github.sources.repo,
});
These are the docs for Trigger.dev v2 which will be deprecated on January 31st, 2025. You probably want the v3 docs.
Parameters
The options for the dynamic trigger.
Used to uniquely identify a DynamicTrigger
An event from an Integration package that you want to attach to the DynamicTrigger. The event types will come through to the payload in your Job’s run.
An external source fron an Integration package
Returns
const dynamicOnIssueOpenedTrigger = client.defineDynamicTrigger({
id: "github-issue-opened",
event: events.onIssueOpened,
source: github.sources.repo,
});
Was this page helpful?
const dynamicOnIssueOpenedTrigger = client.defineDynamicTrigger({
id: "github-issue-opened",
event: events.onIssueOpened,
source: github.sources.repo,
});