# TeamSort

> Let a group decide together with TeamSort's ranked-choice polls, where everyone puts the options in their order of preference and the favourite rises to the top. Give it a question such as where to hold the team offsite, with the choices or without them, and TeamSort writes the poll, suggests choices if you left them out, and hands back a link. Open the link to review the poll, publish it and share it with your group. Links last 7 days. No account or API key required.

App · 2 actions. Web page: https://docs.lodol.com/docs/integrations/teamsort

## Actions

### Draft a ranked-choice poll

Turn a question into a ranked-choice poll and get a link to it. List the choices yourself, or leave them out and TeamSort suggests some. Whoever opens the link reviews the poll, publishes it and shares it for voting. The link works for 7 days.

**Inputs**

- Question (`question`, text, required): What the group is deciding, in your own words. Add any context that helps, such as the budget or the date. Up to 2,000 characters.
- Choices (`choices`, list): The options people will put in order, 2 to 10, one per line. Leave empty and TeamSort suggests choices from the question.

**Outputs**

- `choice_count` (number): How many choices the poll has.
- `choices` (list): The choices on the poll, in order.
- `choices_suggested` (true/false): True when TeamSort suggested the choices because none were given.
- `draft_id` (text): The draft's ID, for reading it back with Get a poll draft.
- `link_expires_at` (text): When the link stops working, 7 days after the draft was made (UTC).
- `review_link` (text): The link to open to review, publish and share the poll. It works for 7 days.
- `title` (text): The poll's title, written by TeamSort.

**Example output**

```json
{
  "choice_count": 7,
  "choices": [
    "Chips & Dip",
    "Veggie Tray",
    "Cookies",
    "Fruit Platter",
    "Popcorn",
    "Cheese & Crackers",
    "Mini Sandwiches"
  ],
  "choices_suggested": true,
  "draft_id": "TT9dAE4JmC",
  "link_expires_at": "2026-10-22T21:31:40Z",
  "review_link": "https://teamsort.world/create?ref=TT9dAE4JmC",
  "title": "Best snack for Friday team meeting"
}
```

### Get a poll draft

Read back a poll draft: its title, the instructions for voters, and each choice with the detail TeamSort wrote for it. Use the draft's link or ID. Drafts are kept for 7 days.

**Inputs**

- Draft (`draft`, text, required): The draft's link, or the ID at the end of it. Draft a ranked-choice poll returns both.

**Outputs**

- `choice_count` (number): How many choices the poll has.
- `choice_names` (list): Just the choices' names, in order.
- `choices` (list): Each choice with its supporting detail.
- `draft_id` (text): The draft's ID.
- `instructions` (text): What voters are told before they rank. Often empty.
- `review_link` (text): The link to open to review, publish and share the poll.
- `title` (text): The poll's title.

**Example output**

```json
{
  "choice_count": 3,
  "choice_names": [
    "Chips & Dip",
    "Veggie Tray",
    "Cookies"
  ],
  "choices": [
    {
      "details": "Classic crowd-pleaser, think tortilla chips with salsa or guacamole.",
      "name": "Chips & Dip"
    },
    {
      "details": "Assorted fresh vegetables with ranch or hummus dipping sauce.",
      "name": "Veggie Tray"
    },
    {
      "details": "A mix of freshly baked or store-bought cookies for something sweet.",
      "name": "Cookies"
    }
  ],
  "draft_id": "TT9dAE4JmC",
  "instructions": "",
  "review_link": "https://teamsort.world/create?ref=TT9dAE4JmC",
  "title": "Best snack for Friday team meeting"
}
```
