n8n workflows break when users send unpredictable text.
JSONFIRST adds a structured intent layer inside n8n Code nodes — parse natural language into routable JDON before your Switch nodes.
n8n input → JSONFIRST → JDON → Switch → Execution.
JSONFIRST helps build reliable AI agents by converting natural language into structured JSON intent.
Webhook / Telegram / Slack
↓
[n8n Code node — JSONFIRST parse]
↓
JDON: { action: "send", object: "report" }
↓
[Switch on action.normalized]
↓
HTTP Request / Email / Database
Drop this in a n8n Code node (JavaScript):
const { parseIntent } = require('jsonfirst-n8n');
const jdon = await parseIntent(
$json.message,
'YOUR_JSONFIRST_API_KEY'
);
return [{ json: jdon }];Then add a Switch node routing on:
{{ $json.jdons[0].action.normalized }}
| Value | Route to |
|---|---|
send |
Email node |
create |
Database node |
book |
Calendar node |
Use jsonfirst-n8n (this package) in a Code node when you need custom logic around the JSONFIRST call.
Use n8n-nodes-jsonfirst for a drag-and-drop node in the visual editor.
npm install jsonfirst-n8nGet your API key at jsonfirst.com → Dashboard → API Console.
MIT © JSONFIRST