# Trello integration

Source: https://pinprompt.veren-technology.com/docs/reference/trello

Connects a pinprompt project to one **Trello board**, so items become Trello cards there, and lists and comments sync both ways. It works with any Trello workspace. Like every integration it follows the activity log: turning it off changes nothing else, and nothing in Trello ever closes an item (people sign off in pinprompt).

**Status: Experimental**, in the next release (after 0.4.5). Tested end to end against a stand-in Trello API; not yet connected to a real Trello workspace. Try it on a test project first.

## Server setup (once)

Trello's API belongs to an app, so whoever runs pinprompt makes one first:

1. Open [Trello's Power-Up admin](https://trello.com/power-ups/admin), create a Power-Up (any workspace you're an admin of), and generate its **API key**. Next to it is the **secret**.
2. Set `PINPROMPT_TRELLO_KEY` (the API key) and `PINPROMPT_TRELLO_SECRET` (the secret) on the server and redeploy. Add the server's address as an allowed origin of the key.

Until both are set, the Trello card says *Trello isn't set up on this server yet* and can't be connected. The secret also checks Trello's webhooks, so keep it private. If the server later loses either one, a connected Trello card says *not set up* and *Nothing syncs* until both are back: calls to Trello fail and every call from Trello is refused.

## What you need (per person)

A **token**: on the Trello card, **Connect Trello → Get one** opens Trello's page asking to allow pinprompt (read and write, no expiry). Allow it and paste the token Trello shows. pinprompt acts in Trello as that person: cards and comments from pinprompt show their name. Revoking pinprompt in Trello (*Settings → Applications*) disconnects it; connect again with a new token.

## Per project

![Connect Trello: the token, then the board](https://pinprompt.veren-technology.com/docs-shots/trello-connect.jpg)

Owner or developer: **Settings → Integrations → Connect Trello**. Paste the token, then pick the board. Optionally switch on *Create a Trello card for every agent-ready item*; otherwise cards are made only when someone asks on an item. **Change** takes a new token or another board; the item links stay.

The card shows **one way only** when the webhook couldn't be made (Trello checks the server answers first), with Trello's reason and **Try again**.

## Lists are the status

pinprompt reads the board's lists when connecting, and reads each one's meaning from its name: *Doing*, *In progress*, *Review* are started; *Done*, *Shipped* are done; *Canceled*, *Won't fix* are canceled; anything else is to do. New cards go to the top of the first to-do list. When an agent takes an item, the card moves to the started list (*Doing* or *In progress*); when it is signed off, to the done list.

## What syncs

![An item with its Trello card, Doing](https://pinprompt.veren-technology.com/docs-shots/trello-item.jpg)

| pinprompt | Trello |
|---|---|
| **Create Trello card** on an item (or, with the switch on, every agent-ready item) | A card in the first list, `[FB-12] Title`, with the spec as its description, and the item attached as a link. Screenshots stay in pinprompt (the link opens them) |
| **Link** with the card's link | Checked in Trello (it must be on the connected board), then linked. One item per card |
| Spec revised | Name and description updated |
| An agent takes it (With agent) | Moved to a started list, only from a to-do one |
| Done / Won't fix / Merged | A comment, then the done list (a canceled list for won't fix, when there is one) |
| A person's or agent's comment | A comment "**Mia** commented on FB-12 in pinprompt:" |

| Trello | pinprompt |
|---|---|
| Card moved to another list | The link shows the list, and a line "#12 moved to Done in Trello by Ana" |
| Comment | On the item as "Ana (Trello)", unless pinprompt posted it |
| Card deleted | The link is marked deleted; **Create Trello card** makes a new one |

The same privacy rules as the other trackers: on an item a client reads, internal notes never go, and a client's own comments go only with **Client comments** on. A comment that came in from another tracker is never sent on to Trello.

**Agents** need nothing new: they work items over MCP as before, and the item's links include the Trello card.

## Security

- The token is stored encrypted with `PINPROMPT_SECRET_KEY` and never shown again. The app secret stays in the server's environment.
- Trello calls `<base>/api/hooks/tracker/trello/<integration id>`. Each call is signed with the app secret over the body and that exact address (`X-Trello-Webhook`, HMAC-SHA1); anything else gets 401. Repeats are refused, and only items of the connected project are touched.
- `PINPROMPT_TRELLO_API` points pinprompt at another Trello API base (tests and local runs use a stand-in). Leave it unset in production.

## Disconnecting

**Disconnect** forgets the token. Cards stay in Trello and items keep their links. Revoke pinprompt in Trello (*Settings → Applications*) to remove its webhook too.

## Not built yet

- Screenshots uploaded to the card (Trello attaches files only to an existing card).
- Members, labels and due dates on the card.
- Archived cards: an archived card stays linked as it was.
