Build configuration
If you are not using the Vercel integration, you can sync environment variables manually by adding thesyncVercelEnvVars build extension to your trigger.config.ts file. This extension will run automatically every time you deploy your Trigger.dev project.
You need to set the
VERCEL_ACCESS_TOKEN and VERCEL_PROJECT_ID environment variables, or pass
in the token and project ID as arguments to the syncVercelEnvVars build extension. If you’re
working with a team project, you’ll also need to set VERCEL_TEAM_ID, which can be found in your
team settings. You can find / generate the VERCEL_ACCESS_TOKEN in your Vercel
dashboard. Make sure the scope of the token covers
the project with the environment variables you want to sync.When running the build from a Vercel build environment (e.g., during a Vercel deployment), the
environment variable values will be read from
process.env instead of fetching them from the
Vercel API. This is determined by checking if the VERCEL environment variable is present. The
API is still used to determine which environment variables are configured for your project, but
the actual values come from the local environment.trigger.config.ts
Build extensions allow you to hook into the build system and
customize the build process or the resulting bundle and container image (in the case of
deploying). You can use pre-built extensions or create your own.
Running the sync operation
To sync the environment variables, all you need to do is run ourdeploy command. You should see some output in the console indicating that the environment variables have been synced, and they should now be available in your Trigger.dev dashboard.

