anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
An n8n workflow with a webhook: post any request and Claude Haiku 4.5 labels it support, technical, sales or general, with a priority and a one-line summary. The caller gets that label back in the same call.
Webhook requests sorted into four routes by Claude is an n8n workflow in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page or copy its JSON, then import it into an n8n canvas. Nothing runs until you activate it in n8n.
Webhook request
It starts when something sends a POST request to the path ai-router with:
The caller gets the route, priority and summary at once, and the request waits at its Switch output for nodes of yours
What you need before you start.
Language model
Runs claude-haiku-4-5 through the Messages API to label each request with a route, a priority and a one-line summary.
NeedsAnthropic API key, read from the ANTHROPIC_API_KEY server variable
Checked by Mindket on 13 Nov 2026
This n8n workflow sorts incoming requests with Claude. It listens for a POST at the path ai-router and sends the request’s body to Anthropic’s Messages API. There claude-haiku-4-5 answers with a route (support, technical, sales or general), a priority and a one-sentence summary. A Code node reads that answer, and a Switch node splits the request across four outputs. The caller gets the same three fields back as JSON. Five nodes do the work, and no sticky notes explain them.
Developers and small teams who collect mixed requests through one form or endpoint and want a first label before a person reads each one. Skip it if the Switch’s outputs must do something out of the box. As imported, they are empty, and only the reply shows the route.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Software | Support leads | Post each contact form entry and read the route in the reply | A lead sees a bug report come back as technical with high priority. |
| Agencies | Account managers | Sort enquiries from a site’s form before they reach the inbox | An agency sees a quote request labeled sales. |
| Ecommerce | Shop owners | Label messages from a store’s contact page | A shop sees a late-order question labeled support. |
| Internal tools | Developers | Put the routing step behind a company’s own forms and apps | An intranet form gets a route and a summary for each ticket. |
You need a little n8n: import a file, give it one Anthropic key and send a test request with curl or any tool that posts JSON.
Any n8n that can reach Anthropic’s API will run it. The Switch node is the place to add whatever should happen next.
Download saves a zip with workflow.json and Mindket’s setup notes in your downloads folder. One Anthropic key is all it needs.
| Need | Detail |
|---|---|
| n8n | On n8n Cloud or on a server of your own |
| Anthropic | An API key for the Messages API. The call uses claude-haiku-4-5 |
| A sender | curl, a form or any app that can post JSON to a web address |
workflow.json.ANTHROPIC_API_KEY with your key. The x-api-key header in Claude Classifier reads it. Where you cannot set server variables, type your key over that header’s expression.Incoming Webhook and copy its test address. Its path is ai-router.Route Switch.Post any JSON, such as a message and a name, to the webhook’s address. The reply comes back in the same call with route, priority and summary. Inside the run, Route Switch sends the request down the output named after the route, and general or anything unmatched goes to the fourth.
| To change | Where |
|---|---|
| The route names | The system message in Claude Classifier and the three rules in Route Switch, which must match |
| The model | model in Claude Classifier, claude-haiku-4-5 in the file |
| The length of the answer | max_tokens in Claude Classifier, 100 in the file |
| The reply | The JSON in Return Route Result |
| The leftovers | The fourth output of Route Switch, which takes general and anything unmatched |
A site’s contact form posts a message saying the export button shows an error since yesterday’s update, with the sender’s name.
Claude answers with a small JSON object: a route such as technical, a priority such as high and one sentence about the failing export. The caller gets received: true with those three fields. The request waits at the technical output of Route Switch with its original payload, ready for a node of yours.
If you are new. n8n draws a workflow as boxes joined by lines, and each box, a node, does one job. This one runs from the webhook to Claude, then reads the answer and sorts it. The reply node hangs on a second line from the webhook, below the first. Send three different messages, then open Parse Classification to see what Claude returned for each.
For experts. The Claude call is a plain HTTP request with the key in a header and the body written as JSON text.
| Node | What it does | What to know |
|---|---|---|
Claude Classifier | Posts to https://api.anthropic.com/v1/messages with anthropic-version 2023-06-01 | The request’s text goes in through JSON.stringify, twice |
Parse Classification | Takes the first {...} from Claude’s text and parses it | A failed parse becomes route general, priority medium, summary Unable to classify |
Route Switch | Three rules on route, ignoring case | The fourth output takes everything else |
Return Route Result | Answers the webhook with JSON | It reads Parse Classification by name, so it needs to run after that branch |
The router labels and answers, but nobody receives the request yet. Two expressions also needed repair.
Route Switch have no node attached, so a request stops there until you add yoursoptions, where n8n ignores it, so a general request had no output. The Claude request pasted the payload’s JSON between quote marks, which breaks the body, and the reply’s summary could break the same way. Mindket’s copy moves the fallback and wraps both in JSON.stringifyReturn Route Result below Claude Classifier. n8n’s current execution order runs branches from the top of the canvas downclaude-haiku-4-5-20251001 as active, with no shutdown date announcedIncoming Webhook before you share itAn n8n workflow with a webhook. You post any request to it, and Claude Haiku 4.5 labels the request support, technical,
sales or general, with a priority and a one-sentence summary. The caller gets that label back in the same call, and a
Switch node splits the request across four outputs for nodes of your own.
workflow.json: the workflow as n8n exports it, five nodes and no sticky notes. It holds no credential.README.md: these notes.Route Switch had fallbackOutput set to extra outside its options, where n8n ignores it, so a request labeledoptions, and the node shows a fourth output.Claude Classifier put JSON.stringify($json.body || $json) between quote marks inside its JSON body. The payload'sJSON.stringify, which adds the outer quotes and escapes the inner ones.Return Route Result put Claude's summary between quote marks the same way. It now uses JSON.stringify, so awebhookId and the file's template ids are gone. Nothing else changed: the model, the API version andclaude-haiku-4-5.workflow.json.ANTHROPIC_API_KEY with your key. The x-api-key header inClaude Classifier reads it as $env.ANTHROPIC_API_KEY. Where you cannot set server variables, type your key overN8N_BLOCK_ENV_ACCESS_IN_NODE, which is false by default.Incoming Webhook and copy its test address. The path is ai-router.Route Switch.Incoming Webhook (Webhook 2) listens for a POST at ai-router and holds the answer until Return Route ResultClaude Classifier posts to https://api.anthropic.com/v1/messages with anthropic-version 2023-06-01,claude-haiku-4-5 and max_tokens 100. Its system message tells Claude to answer only with a JSON object thatParse Classification reads the first text block, takes the first {...} from it and parses it. When that fails itgeneral, priority medium and summary Unable to classify. It keeps the webhook's item asoriginalPayload.Route Switch (Switch 3) compares route with support, technical and sales, ignoring case. The fourth outputReturn Route Result (Respond to Webhook) answers with JSON: received, route, priority and summary.The webhook feeds two lines: Claude Classifier above and Return Route Result below. The file's execution order isv1, which runs the upper line to its end before the lower one, so the reply can read what Parse Classification
found. Keep the reply node below the classifier on the canvas.
Claude Classifier, and the three rules in Route Switch. Keep them inmodel in the JSON body of Claude Classifier.max_tokens there. 100 is enough for a route, a priority and one sentence.Return Route Result.Route Switch, such as a Slack message for support or a CRM row fororiginalPayload.Route Switch have nothing attached. The workflow labels and replies, and the request stops atclaude-haiku-4-5-20251001 as active, with noIncoming Webhook before you share it.NOTICE.md 594 B README.md 5 KB workflow.json 6 KB
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.