Actions5
Update Env Variable
AI-generatedSummary
Updates an existing Vercel project environment variable via a PATCH to the Vercel REST API (v10), replacing its key, value, type, targets and optionally git branch. Returns the API response for each input item.
Inputs
- projectIdOrName (required) — ID or name of the Vercel project that owns the variable.
- envId (required) — ID of the environment variable to update (obtainable from the List Env Variables output).
- envKey (required) — Variable name (key) to send in the update body.
- envValue (required) — Variable value to send in the update body.
- envType — Variable type: encrypted (default), secret, plain, sensitive or system.
- envTarget — Environments the variable applies to: production, preview, development. Defaults to all three.
- gitBranch — Git branch to scope the variable to. Only sent when non-empty.
Output shape
One output item per input item, whose json is the raw Vercel API response (the updated env variable object), paired to the input item.
Key, value, type and target are always sent, so leave none blank unintentionally. With Continue On Fail enabled, failures yield an item with json {error: message}. The source also reads a 'teamIdOverride' parameter that isn't declared in the UI, so the team comes from the credential's teamId (added as the teamId query string) unless that parameter is set. Requires vercelApi credentials.
Examples
Example 1: Rotate an API key value in production only after generating a new one upstream.
projectIdOrName=my-app, envId from a prior List step ({{$json.id}}), envKey=API_KEY, envValue={{$json.newKey}}, envType=secret, envTarget=[production].
Example 2: Change a plain-text feature flag across all environments.
projectIdOrName=my-app, envId=
