# Vercel

> Manage your Vercel projects, deployments, and environment variables: list projects and deployments, create projects, set environment variables, and delete projects through the Vercel REST API.

App · Cloud Computing · 5 actions. Web page: https://docs.lodol.com/docs/integrations/vercel

## Actions

### Create a project

Create a new Vercel project by name and get back its id. A framework preset is optional; Vercel auto-detects one on the first deployment when omitted.

**Inputs**

- Project name (`name`, text, required): The new project's name: lowercase letters, digits, '.', '_' or '-', up to 100 characters (for example 'my-app'). Must be unique within the account.
- Framework preset (`framework`, text): Optional framework preset slug. Leave empty to let Vercel auto-detect.
- Team ID or slug (`team_id`, text): Optional Vercel Team id or slug to act on behalf of a team. Leave empty to use the personal account the access token belongs to.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "accountId": "team_or_user_id",
    "framework": "nextjs",
    "id": "prj_abc123",
    "name": "my-app"
  }
}
```

### Create environment variable

Add an environment variable to a project so its deployments can read it: an API key, a feature flag, a service URL, and so on.

**Inputs**

- Project ID (`project_id`, text, required): The project's id (starts with 'prj_') or its name. Use the id returned by Create a project, or a value from List projects.
- Key (`key`, text, required): The environment variable name, for example 'API_URL'.
- Value (`value`, text, required): The environment variable value.
- Targets (`target`, list): Which environments the variable applies to. Defaults to all of production, preview, and development when left empty.
- Type (`type`, text): How Vercel stores the value: 'encrypted' (default, a standard secret), 'plain' (readable in the dashboard), or 'sensitive' (write-only, never shown again). One of: `encrypted`, `plain`, `sensitive`. Default: `encrypted`.
- Git branch (`git_branch`, text): Optional git branch to scope the variable to (for the preview target).
- Comment (`comment`, text): Optional note describing what the variable is for.
- Update if it exists (`upsert`, true/false): When on, update the value of an existing variable with the same key/target instead of failing on a conflict. Default: `false`.
- Team ID or slug (`team_id`, text): Optional Vercel Team id or slug to act on behalf of a team. Leave empty to use the personal account the access token belongs to.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "created": {
      "createdAt": 1717000000000,
      "id": "env_abc123",
      "key": "API_URL",
      "target": [
        "production",
        "preview",
        "development"
      ],
      "type": "encrypted"
    },
    "failed": []
  }
}
```

### Delete a project

Delete a project by its id or name. This also removes the project's deployments, domains, and environment variables and cannot be undone.

**Inputs**

- Project ID (`project_id`, text, required): The project's id (starts with 'prj_') or its name. Use the id returned by Create a project, or a value from List projects.
- Team ID or slug (`team_id`, text): Optional Vercel Team id or slug to act on behalf of a team. Leave empty to use the personal account the access token belongs to.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "project": "prj_abc123",
    "success": true
  }
}
```

### List deployments

List recent deployments across your account, or narrow to a single project; handy for monitoring build status and the latest release URL.

**Inputs**

- Project ID (`project_id`, text): Optional project id (starts with 'prj_') to only return that project's deployments.
- Project name (`app`, text): Optional project name to filter by (an alternative to Project ID).
- Limit (`limit`, number): Optional maximum number of deployments to return. At least 1.
- Team ID or slug (`team_id`, text): Optional Vercel Team id or slug to act on behalf of a team. Leave empty to use the personal account the access token belongs to.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "deployments": [
      {
        "created": 1717000000000,
        "name": "my-app",
        "readyState": "READY",
        "state": "READY",
        "target": "production",
        "uid": "dpl_abc123",
        "url": "my-app-abc123.vercel.app"
      }
    ],
    "pagination": {
      "count": 1,
      "next": null,
      "prev": null
    }
  }
}
```

### List projects

List the Vercel projects on your account (most recently updated first), optionally filtered by a name search.

**Inputs**

- Name search (`search`, text): Optional text to filter projects by name. Leave empty to list every project.
- Limit (`limit`, number): Optional maximum number of projects to return. At least 1.
- Team ID or slug (`team_id`, text): Optional Vercel Team id or slug to act on behalf of a team. Leave empty to use the personal account the access token belongs to.

**Outputs**

- `result` (object)

**Example output**

```json
{
  "result": {
    "pagination": {
      "count": 1,
      "next": null,
      "prev": null
    },
    "projects": [
      {
        "accountId": "team_or_user_id",
        "framework": "nextjs",
        "id": "prj_abc123",
        "name": "my-app"
      }
    ]
  }
}
```
