# YesNo

> Settle a question with yesno.wtf, the free yes-or-no API. Draw a random yes or no to decide for a workflow, or pick the answer yourself and get a reaction GIF to post with it. Every answer comes with a GIF address that chat apps show as the animation, and with a plain true or false to branch on.

App · 3 actions. Web page: https://docs.lodol.com/docs/integrations/yesno

## Actions

### Check service status

Check whether yesno.wtf is answering, and how quickly. This is the one action that reports a problem as a value instead of failing the step, so a workflow can decide what to do about it. Being throttled is reported separately from being down.

**Inputs**: None.

**Outputs**

- `message` (text)
- `online` (true/false)
- `rate_limited` (true/false)
- `reachable` (true/false)
- `response_time_ms` (number)
- `status_code` (number)

**Example output**

```json
{
  "message": "yesno.wtf is up and answering.",
  "online": true,
  "rate_limited": false,
  "reachable": true,
  "response_time_ms": 84.2,
  "status_code": 200
}
```

### Get a GIF for an answer

Get a reaction GIF for an answer you choose: yes, no or maybe. Use it when a workflow has already decided, such as an approval that went through, and wants a GIF to post with the result. A different GIF can come back on each run.

**Inputs**

- Answer (`answer`, text, required): The answer to get a GIF for. One of: `yes`, `no`, `maybe`. Default: `yes`.

**Outputs**

- `answer` (text): 'yes', 'no' or, about once in 10,000 random asks, 'maybe'. Always lowercase.
- `forced` (true/false): Whether the answer was chosen by the step rather than drawn at random.
- `image` (text): The address of a reaction GIF for the answer, hosted on yesno.wtf. Chat apps show it as the animation when it is posted.
- `is_yes` (true/false): True only when the answer is 'yes'. Added by Lodol so a step can branch on it directly; false for 'maybe' as well as for 'no'.

**Example output**

```json
{
  "answer": "no",
  "forced": true,
  "image": "https://yesno.wtf/assets/no/25-55dc62642f92cf4110659b3c80e0d7ec.gif",
  "is_yes": false
}
```

### Get a yes or no answer

Ask yesno.wtf for a random yes or no, with a reaction GIF to go with it. Each run draws again. About once in 10,000 asks the service says maybe instead; turn off 'Allow maybe' to ask again when it does, so the answer is always yes or no.

**Inputs**

- Allow maybe (`allow_maybe`, true/false): Keep the service's rare 'maybe'. On by default. Turn it off when a later step only handles yes and no, and a maybe is asked again instead. Default: `true`.

**Outputs**

- `answer` (text): 'yes', 'no' or, about once in 10,000 random asks, 'maybe'. Always lowercase.
- `forced` (true/false): Whether the answer was chosen by the step rather than drawn at random.
- `image` (text): The address of a reaction GIF for the answer, hosted on yesno.wtf. Chat apps show it as the animation when it is posted.
- `is_yes` (true/false): True only when the answer is 'yes'. Added by Lodol so a step can branch on it directly; false for 'maybe' as well as for 'no'.

**Example output**

```json
{
  "answer": "yes",
  "forced": false,
  "image": "https://yesno.wtf/assets/yes/12-e4f57c8f172c51fdd983c2837349f853.gif",
  "is_yes": true
}
```
