# Route Tally submissions to Trello by product

Look up a product in D1 and create a card in its assigned Trello list. Unrecognized products go to your triage list.

[Use template](https://dashboard.fasthook.io/workflow/new?templateKey=tally-d1-routing-to-trello&templateName=Route+Tally+submissions+to+Trello+by+product)

**Required accounts**

- Tally
- Cloudflare D1
- Trello

## Route Tally submissions to Trello by product

### 1. Trigger · New Submission

**Tally**. Receive a completed Tally form submission.

### 2. Action · Find the assigned Trello list

**Cloudflare D1**. Run a statement with bound values, or send a batch. Each row in the results uses the column names from your query.

### 3. Action · Create a card in the assigned list

**Trello**. Create a card in a Trello list.

## Set up your workflow

1. **Choose the product question in Tally** Connect Tally and select the form to monitor. Submit a test response with a recognizable product value, such as Atlas. In the D1 lookup, map “Single bound value” to that answer. The template starts with the first answer in the form.
2. **Create the routing table in D1** Select your database and run CREATE TABLE IF NOT EXISTS product\_routing (product TEXT PRIMARY KEY, list\_id TEXT NOT NULL). Copy the Trello list ID for each team and store one row per product. Match the form’s spelling and case, including spaces. For example, replace LIST\_ID with the team’s actual ID and run INSERT INTO product\_routing (product, list\_id) VALUES ('Atlas', 'LIST\_ID').
3. **Set a destination for unknown products** Create a Trello list called Triage, or use your existing triage list. Add a routing row with product set to \* and list\_id set to that list’s ID. For a product missing from the table, the lookup returns this ID. Add it with INSERT INTO product\_routing (product, list\_id) VALUES ('\*', 'TRIAGE\_LIST\_ID'), replacing TRIAGE\_LIST\_ID first.
4. **Connect Trello and check the mapping** Use a Trello connection that can create cards in every destination list. Leave the card’s List ID mapped to first\_row.list\_id from the D1 lookup. The card description includes the Tally submission ID so you can trace it back.
5. **Test both routes** Activate the workflow. Submit Atlas, then a product that has no routing row. Confirm the first card appears in the assigned team list and the second in Triage. Compare each card’s submission ID with its response in Tally.

## Related integrations

- [Tally integrations](https://www.fasthook.io/apps/tally/integrations)
- [Cloudflare D1 integrations](https://www.fasthook.io/apps/cloudflare-d1/integrations)
- [Trello integrations](https://www.fasthook.io/apps/trello/integrations)

## Related workflow templates

- [Triage Tally responses on a Trello board](https://www.fasthook.io/templates/tally-response-triage-to-trello.md): Queue responses from the selected Tally forms for a team review.
