---
title: Recipe: Triage new issues from a webhook · Agent Playground docs
description: Starts when a webhook or GitHub event arrives, labels the new issue with Claude, drafts a first reply, and waits for a person to post it. What it does, when to use it, how to make it yours, and what a run costs.
url: https://www.quietrobot.ai/docs/playground/recipes/webhook-triage
---

# Recipe: Triage new issues from a webhook

Starts when a webhook or GitHub event arrives, labels the new issue with Claude, drafts a first reply, and waits for a person to post it. What it does, when to use it, how to make it yours, and what a run costs.

Starts when a webhook or a GitHub event arrives with a new issue. Claude labels it as a bug, a feature request or a question, drafts a first reply, and the run waits for a person before anything is posted. Without a trigger it reads a sample issue, so you can run it straight away.

| At a glance | |
|---|---|
| **Level** | Advanced |
| **Category** | Coding |
| **Shape** | A webhook starts it, AI labels, a person posts |
| **Plan** | Free and up |
| **Needs a Claude key** | Yes |
| **Limits it comes with** | 1 loop, 900 seconds, $0.10 |

```flow
{"recipe": "webhook-triage", "title": "Triage new issues from a webhook, as it is on the canvas.", "nodes": [["read", "code", "Read the issue"], ["label", "choice", "Label it", "bug · feature · question"], ["reply", "model", "Draft a first reply"], ["post", "approval", "Post label and reply?"], ["posted", "run", "Post them"], ["left", "end", "Leave it for a person"]], "edges": [["read", "label"], ["label", "reply", "any label"], ["reply", "post"], ["post", "posted", "Approved"], ["post", "left", "Denied"]]}
```

## The steps

| Step | Block | What it does |
|---|---|---|
| Read the issue | Run code | Reads the issue from `.qr/trigger.json`, which a trigger writes, or from a sample payload when the run wasn't started by one. |
| Label it | Ask AI, Decision | Claude (Haiku, quick and cheap) labels the issue: bug, feature or question. |
| Draft a first reply | Ask AI, Text | Claude drafts a short first reply for that label, asking for one missing detail if it would help. |
| Post label and reply? | Approval | A person reads the label and the reply, then approves posting them or leaves the issue for a person. |
| Post them | Run command | Says what would be posted. The recipe posts nothing until you add your token and API call. |

## When to use it

* New issues, form entries or orders should get a first look within a minute, at any hour.
* You want AI to sort and draft, and people to decide what's posted.
* A flow should start from another system, not from someone pressing Run.

## Run it

The quick way: choose **Try it now** under the drawing. It opens the recipe in the Playground as a flow of your own, after you sign in if you aren't yet. **Simulate** opens it and shows the forecast, and **Run** opens it and asks before it starts, with what the run will likely cost. From the dashboard instead:

1. In the dashboard sidebar, open **Agent Playground → Recipes** and find **Triage new issues from a webhook**. Choose **Advanced** to filter the list. In the builder, **Recipes** in the toolbar lists them too.
2. Choose **Use this recipe**. It becomes a flow of your own, so changing it never changes the recipe.
3. If you haven't yet, [save your Claude key](https://www.quietrobot.ai/docs/playground/ai-steps#add-your-claude-key) on the **Secrets** page. The builder offers **Add a key…** in the step's key list if it's missing.
4. Choose **Simulate** to see the forecast, then **Run**.
5. When the run waits for a person, approve or deny it from the banner, from **Approvals**, or from the approval email.

**What you'll see:** Run it from the builder and it reads the sample issue (#57, a coupon bug). Then send a real event: add a **Webhook** trigger and post `{"issue": {"number": 1, "title": "...", "body": "..."}}` to it, or add a **GitHub event** trigger for issues.

## Make it yours

1. Add a trigger (triggers need [Pay as you go with a card](https://www.quietrobot.ai/docs/playground/triggers#who-can-use-triggers)): **Webhook** for your own systems, or **GitHub event** with the `issues` event for a repository.
2. Change the labels in **Label it** to yours (2 to 6), and give each its own path if they need different handling.
3. In **Post them**, call your tracker's API with a token saved on the **Secrets** page. Keep the approval before it.

## What a run costs

These are the builder's own forecast for the recipe as it comes, with its limits, rounded. **Simulate** shows the same numbers for your version, and they change as you change the flow.

| | Typical | 1 in 10 runs | At most |
|---|---|---|---|
| **Sandbox time** | $0.002 | $0.002 | $0.01 |
| **Claude, on your key** | $0.002 | $0.002 | the run's spend limit |
| **How long it takes** | about 2 minutes | about 3 minutes | 900 seconds |

A typical run uses $0.0017 of sandbox time, so about 600 runs cost $1, and every plan includes $5 of usage a month. The time includes a person taking a minute or two to answer the approval. The clock, and the sandbox, keep running while the run waits. Claude is billed by Anthropic to your own key, at their usual prices. The run counts it toward its spend limit, so it can't overspend, but we don't charge you for it. **At most** is the most a run could cost with these limits: it stops at $0.10 or 900 seconds, whichever comes first.

## Related

* [Triggers](https://www.quietrobot.ai/docs/playground/triggers)
* [Tutorial 6: Run a flow on its own](https://www.quietrobot.ai/docs/playground/tutorials/triggers)
* [Support inbox triage](https://www.quietrobot.ai/docs/playground/recipes/support-triage)
* [All recipes](https://www.quietrobot.ai/docs/playground/recipes)
