# Update Card — Trello

> Updates a card. See the documentation.

- Key: `trello-update-card`
- Type: Action (Write)
- Version: 0.2.7
- App: Trello (`trello`) — https://pipedream.com/apps/trello.md
- This page (HTML): https://pipedream.com/apps/trello/actions/update-card
- Hints: destructive · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/trello/actions/update-card/update-card.mjs

## Description

Updates a card. [See the documentation](https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put).

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `idBoard` | `string` | Yes | The Trello board you wish to select Options are loaded from the connected account. |
| `cardId` | `string` | Yes | Specify the card to update Options are loaded from the connected account. |
| `name` | `string` | No | The new name for the card. |
| `desc` | `string` | No | The new description for the card. |
| `closed` | `boolean` | No | Whether to archive the card |
| `idMembers` | `string[]` | No | Change the members that are assigned to the card Options are loaded from the connected account. |
| `idAttachmentCover` | `string` | No | Assign an attachment id to be the cover image for the card Options are loaded from the connected account. |
| `idList` | `string` | No | Move the card to a particular list Options are loaded from the connected account. |
| `idLabels` | `string[]` | No | Array of labelIDs to add to the card Options are loaded from the connected account. |
| `pos` | `string` | No | The position of the new card. top, bottom, or a positive float |
| `due` | `string` | No | Card due date in ISO format |
| `dueComplete` | `boolean` | No | Whether the due date should be marked complete. |
| `subscribed` | `boolean` | No | Whether the member should be subscribed to the card. |
| `address` | `string` | No | For use with/by the Map Power-Up |
| `locationName` | `string` | No | For use with/by the Map Power-Up |
| `coordinates` | `string` | No | Latitude, longitude coordinates. For use with/by the Map Power-Up. Should take the form lat, long. |
| `customFieldIds` | `string[]` | No | An array of custom field Ids to create/update Options are loaded from the connected account. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "trello",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "trello-update-card",
  arguments: {
    idBoard: "Board",
    cardId: "Card",
  },
})
```

**TypeScript**

```ts
import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "trello-update-card",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    trello: { authProvisionId: "apn_xxxxxxx" },
    idBoard: "Board",
    cardId: "Card",
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "trello-update-card",
    "configured_props": {
      "trello": { "authProvisionId": "apn_xxxxxxx" },
      "idBoard": "Board",
      "cardId": "Card"
    }
  }'
```

---

- App: https://pipedream.com/apps/trello.md · All apps: https://pipedream.com/apps
