Skip to main content

1. Create an Integration client

Note that we used process.env.GITHUB_TOKEN and process.env.OPENAI_API_KEY. They’re environment variables, which are a way of not putting secret values directly in your code. For Next.js, local environment variables usually live in a .env.local file in the root of the project.
.env.local

2. Use the Integration client

There are two way to use Integrations in a Job:
  • You can perform Tasks in the run function, by passing the Integration client into the integrations object.
  • You can use webhooks to Trigger a Job.
This example automatically assigns “matt-aitken” to any new issue in the trigger.dev repo (lucky him).

3. Viewing connections in the dashboard

The Integrations page

List of integrations The "Integrations" page shows
  1. Some of the APIs that you can use with Trigger.dev (you can use any API). Selecting one of these will give you instructions on how to use it.
  2. Your connected integrations. Clicking these will give you more details on that connection.

Connected API Key Integration detail page

An API Key Integration Some useful things on this page
  1. The id that you gave the connection when you defined it in your code
  2. The Jobs that are using this connection

References

View Integrations

Trigger.dev integrates with a wide range of services.