Skip to main content

How it works

The Vercel integration connects your Vercel project to your Trigger.dev project so that every Vercel deployment automatically triggers a Trigger.dev deployment. It also syncs environment variables from Vercel into Trigger.dev and supports atomic deployments to keep your app and tasks in sync. This eliminates the need to manually run the trigger.dev deploy command or maintain custom CI/CD workflows for Vercel-based projects.
The Vercel integration requires the GitHub integration to be connected as well, since Trigger.dev builds your tasks from your GitHub repository.

Installation

You can connect Vercel from two entry points:

From the Trigger.dev dashboard

1

Connect Vercel

Go to your project’s Settings page and click Connect Vercel. This will redirect you to Vercel to authorize the Trigger.dev app.
2

Select a Vercel project

Choose which Vercel project to connect to your Trigger.dev project.
3

Map environments

If your Vercel project has custom environments, choose which one maps to your Trigger.dev staging environment.
4

Sync environment variables

Review the environment variables that will be pulled from Vercel into Trigger.dev. You can deselect any variables you don’t want to sync.
5

Configure build settings

Optionally adjust build settings for atomic deployments, env var pulling, and new env var discovery.
6

Connect GitHub

If your GitHub repository isn’t already connected, you’ll be prompted to connect it.

From the Vercel Marketplace

1

Install the integration

Find Trigger.dev on the Vercel Marketplace and install it. This will redirect you to Trigger.dev to complete setup.
2

Select your Trigger.dev organization and project

Choose which Trigger.dev organization and project to connect. If you’re new to Trigger.dev, you’ll be guided through creating an organization and project.
3

Connect GitHub

If your GitHub repository isn’t already connected, you’ll be prompted to connect it.
When installing from the Vercel Marketplace, default build settings are applied automatically. You can adjust them later in your project settings.

Environment variable sync

The integration syncs environment variables in both directions: Vercel → Trigger.dev: Environment variables from your Vercel project are pulled into Trigger.dev. This happens during the initial setup and optionally before each build. Variables are synced per-environment (production, staging, preview). Trigger.dev → Vercel: Trigger.dev syncs API keys (like TRIGGER_SECRET_KEY) to your Vercel project so your app can communicate with Trigger.dev. The following variables are excluded from the Vercel → Trigger.dev sync:
  • TRIGGER_SECRET_KEY, TRIGGER_VERSION, TRIGGER_PREVIEW_BRANCH (managed by Trigger.dev)
  • Sensitive/secret-type variables (Vercel API limitation)
You can control sync behavior per-variable from your project’s Vercel settings. Deselecting a variable prevents its value from being updated during future syncs.
For dynamic environment variables (e.g., from NeonDB branching), use the syncEnvVars build extension instead. Learn more about environment variables.

Atomic deployments

Atomic deployments ensure your Vercel app and Trigger.dev tasks are deployed in sync. When enabled, Trigger.dev gates your Vercel deployment until the task build completes, then triggers a Vercel redeployment with the correct TRIGGER_VERSION set. This guarantees your app always uses the matching version of your tasks. Atomic deployments are enabled for the production environment by default.
When atomic deployments are enabled, the integration automatically disables Auto-assign Custom Production Domains on your Vercel project. This is required so that Vercel doesn’t promote a deployment before the Trigger.dev build is ready.
Previously, setting up atomic deployments with Vercel required custom GitHub Actions workflows. The Vercel integration automates this entirely. For more details on how atomic deployments work, see Atomic deploys.

Environment mapping

The integration maps Vercel environments to Trigger.dev environments:
Vercel environmentTrigger.dev environment
ProductionProduction
Custom environmentStaging (you choose which one)
PreviewPreview
DevelopmentDevelopment
If your Vercel project has a custom environment, you can select which one maps to your Trigger.dev staging environment during setup or in your project settings.
Preview deployments require the preview environment to be enabled on your project. Learn more about preview branches.

Build settings

You can configure the following settings per-environment from your project’s Vercel settings:
  • Atomic deployments: Controls whether Trigger.dev and Vercel deployments are synchronized. Enabled for production by default.
  • Pull env vars before build: When enabled, Trigger.dev pulls the latest environment variables from Vercel before each build. Enabled for production, staging, and preview by default.
  • Discover new env vars: When enabled, new environment variables found in Vercel that don’t yet exist in Trigger.dev are created automatically during builds. Only available for environments that also have env var pulling enabled. Enabled for production, staging, and preview by default.

Disconnecting

You can disconnect the Vercel integration from either side:
  • From Trigger.dev: Go to your project Settings and disconnect Vercel.
  • From Vercel: Uninstall the Trigger.dev integration from your Vercel dashboard. This is automatically detected and the connection is removed on the Trigger.dev side.
Disconnecting stops automatic deployments, environment variable syncing, and deployment checks. Your existing deployments and environment variables are not affected.