---
title: "defineDynamicTrigger()"
description: "Define a Dynamic Trigger"
---

## Parameters

<ResponseField name="options" type="DynamicTriggerOptions" required>
  The options for the dynamic trigger.
  <Expandable title="options" defaultOpen>
    <ResponseField name="id" type="string" required>
      Used to uniquely identify a DynamicTrigger
    </ResponseField>
    <ResponseField name="event" type="event" required>
      An event from an [Integration](/integrations) package that you want to attach to the
      DynamicTrigger. The event types will come through to the payload in your Job's run.
    </ResponseField>
    <ResponseField name="source" type="source" required>
      An external source fron an [Integration](/integrations) package
    </ResponseField>
  </Expandable>
</ResponseField>

## Returns

<ResponseField name="DynamicTrigger instance" type="DynamicTrigger" />

<RequestExample>

```ts example
const dynamicOnIssueOpenedTrigger = client.defineDynamicTrigger({
  id: "github-issue-opened",
  event: events.onIssueOpened,
  source: github.sources.repo,
});
```

</RequestExample>
