{"_id":"@aibus/n8n-nodes-qwen-extractor","_rev":"2-51c2085caa82a89b629a419ec780d23a","name":"@aibus/n8n-nodes-qwen-extractor","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.3":{"name":"@aibus/n8n-nodes-qwen-extractor","version":"0.1.3","keywords":["n8n-community-node-package","qwen","dashscope","structured-output","json-schema","extraction","ai"],"author":{"name":"aibus-dev","email":"hello@aibus.dev"},"license":"MIT","_id":"@aibus/n8n-nodes-qwen-extractor@0.1.3","maintainers":[{"name":"tungnt2k","email":"tungnt2k@gmail.com"}],"homepage":"https://github.com/aibus-dev/n8n-qwen-extractor-node#readme","bugs":{"url":"https://github.com/aibus-dev/n8n-qwen-extractor-node/issues"},"n8n":{"nodes":["dist/nodes/QwenStructuredDataExtractor/QwenStructuredDataExtractor.node.js"],"strict":true,"credentials":["dist/credentials/QwenStructuredExtractorApi.credentials.js"],"n8nNodesApiVersion":1},"dist":{"shasum":"f12f8813b2f64c2f2ee6f6821c2dad11dcac9f26","tarball":"https://registry.npmjs.org/@aibus/n8n-nodes-qwen-extractor/-/n8n-nodes-qwen-extractor-0.1.3.tgz","fileCount":33,"integrity":"sha512-9XHp0QcVxdgXtFgQsZ/6gbvPqgAYH+3yVdut6xLHyRrR1s8ZOo5CYyZksaEvIRbg0dkIpaAmhfkxw/k+9pzhDg==","signatures":[{"sig":"MEUCIBglBJP1eyLC+o7DohxN7h2fIfSyvxqlhukYdAdFbI7jAiEAnoII1nC5kK4v9mrCo1f0oxtw3AMdWEivYdBbEPuX/gI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":287279},"engines":{"node":">=22.16"},"gitHead":"0c4f7e430d3e7973f7b4600ebc32d1154ffb0301","scripts":{"dev":"n8n-node dev","lint":"n8n-node lint","test":"jest","build":"n8n-node build","release":"n8n-node release","lint:fix":"n8n-node lint --fix","test:watch":"jest --watch","build:watch":"tsc --watch","test:coverage":"jest --coverage","prepublishOnly":"n8n-node prerelease"},"_npmUser":{"name":"tungnt2k","email":"tungnt2k@gmail.com"},"repository":{"url":"git+ssh://git@github.com/aibus-dev/n8n-qwen-extractor-node.git","type":"git"},"_npmVersion":"11.6.2","description":"n8n node that extracts structured data from conversations using Qwen and a strict JSON Schema","directories":{},"_nodeVersion":"24.13.0","_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"9.32.0","ts-jest":"^29.4.12","prettier":"3.6.2","release-it":"^19.0.4","typescript":"5.9.2","@types/jest":"^29.5.14","@n8n/node-cli":"^0.43.4"},"peerDependencies":{"n8n-workflow":"*"},"_npmOperationalInternal":{"tmp":"tmp/n8n-nodes-qwen-extractor_0.1.3_1786851849578_0.12224208927633051","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@aibus/n8n-nodes-qwen-extractor","version":"0.1.4","description":"n8n node that extracts structured data from conversations using Qwen and a strict JSON Schema","license":"MIT","homepage":"https://github.com/aibus-dev/n8n-qwen-extractor-node#readme","keywords":["n8n-community-node-package","qwen","dashscope","structured-output","json-schema","extraction","ai"],"author":{"name":"aibus-dev","email":"hello@aibus.dev"},"repository":{"type":"git","url":"git+ssh://git@github.com/aibus-dev/n8n-qwen-extractor-node.git"},"bugs":{"url":"https://github.com/aibus-dev/n8n-qwen-extractor-node/issues"},"scripts":{"build":"n8n-node build","build:watch":"tsc --watch","dev":"n8n-node dev","lint":"n8n-node lint","lint:fix":"n8n-node lint --fix","test":"jest","test:watch":"jest --watch","test:coverage":"jest --coverage","release":"n8n-node release","prepublishOnly":"n8n-node prerelease"},"engines":{"node":">=22.16"},"n8n":{"n8nNodesApiVersion":1,"strict":true,"credentials":["dist/credentials/QwenStructuredExtractorApi.credentials.js"],"nodes":["dist/nodes/QwenStructuredDataExtractor/QwenStructuredDataExtractor.node.js"]},"devDependencies":{"@n8n/node-cli":"^0.43.4","@types/jest":"^29.5.14","eslint":"9.32.0","jest":"^29.7.0","prettier":"3.6.2","release-it":"^19.0.4","ts-jest":"^29.4.12","typescript":"5.9.2"},"peerDependencies":{"n8n-workflow":"*"},"gitHead":"1c3c4b67324da0bbe02b33657bec0abbb72f741e","_id":"@aibus/n8n-nodes-qwen-extractor@0.1.4","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-rlbSZF0Ci8UWAM0Khl6qzChGqKRUXIrg8cwniG7oBwEE2Oa+oV5LnzS1i+dkrhqwYQcDRGHImzLaTGej9/SdPA==","shasum":"b42906c495e9a6acce368933a28d6bef9ab1eef6","tarball":"https://registry.npmjs.org/@aibus/n8n-nodes-qwen-extractor/-/n8n-nodes-qwen-extractor-0.1.4.tgz","fileCount":33,"unpackedSize":287272,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@aibus%2fn8n-nodes-qwen-extractor@0.1.4","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDReX5B/KMJjCeiMp4Iw4yPs4Y74gWTDafFg/7iN7lOTgIgU+ZIfRhDCT5kVrAWRvZ0sxSLjSG7SlvBFDAvU2BrmOE="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:440487e6-25a8-4cdc-beab-6c1d9f5c5843"}},"directories":{},"maintainers":[{"name":"tungnt2k","email":"tungnt2k@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/n8n-nodes-qwen-extractor_0.1.4_1786852857611_0.3895556403321254"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-16T03:44:09.393Z","modified":"2026-08-16T04:00:58.284Z","0.1.3":"2026-08-16T03:44:09.724Z","0.1.4":"2026-08-16T04:00:57.829Z"},"bugs":{"url":"https://github.com/aibus-dev/n8n-qwen-extractor-node/issues"},"author":{"name":"aibus-dev","email":"hello@aibus.dev"},"license":"MIT","homepage":"https://github.com/aibus-dev/n8n-qwen-extractor-node#readme","keywords":["n8n-community-node-package","qwen","dashscope","structured-output","json-schema","extraction","ai"],"repository":{"type":"git","url":"git+ssh://git@github.com/aibus-dev/n8n-qwen-extractor-node.git"},"description":"n8n node that extracts structured data from conversations using Qwen and a strict JSON Schema","maintainers":[{"name":"tungnt2k","email":"tungnt2k@gmail.com"}],"readme":"# n8n-nodes-qwen-extractor\n\nAn [n8n](https://n8n.io) community node that extracts structured data from conversation transcripts and free text using **Qwen** with **strict JSON Schema** output.\n\n## Features\n\n- **Any schema** — paste any JSON Schema (orders, leads, invoices, tickets…). The model is forced to match it via `response_format: json_schema` with `strict: true`.\n- **Live model dropdown** — loaded from the credential's `/models` endpoint, with JSON Schema-capable models listed first and the rest clearly flagged. Falls back to a built-in list when the endpoint has no such route.\n- **Fails before it spends tokens** — empty input, missing model, and malformed schemas are rejected before the API call.\n- **No silent empty results** — an empty response, a content-filter block, or a reply that landed in `reasoning_content` raises a clear error instead of returning `{}`.\n- **Token and duration tracking** — a summary line in the output pane, including cached tokens.\n- **Clean output** — only the fields in your schema, flat at the root.\n\n## Requirements\n\n- Node.js **>= 22.16** (required by `@n8n/node-cli` — see `.nvmrc`).\n- An API key from Alibaba Cloud Model Studio (DashScope), or any OpenAI-compatible gateway serving Qwen.\n\n## Installation\n\nFollow the [community node installation guide](https://docs.n8n.io/integrations/community-nodes/installation/) and enter the package name `n8n-nodes-qwen-structured-extractor`.\n\n## Credentials\n\nThis node uses the **Qwen Structured Extractor API** credential owned by this package (type `qwenStructuredExtractorApi`). It is **not shared** with the `qwenApi` credential from `n8n-nodes-azbot-qwen-model` — both packages can be installed on the same n8n instance without interfering.\n\n| Field | Description |\n| --- | --- |\n| API Key | Your `sk-...` key from Alibaba Cloud Model Studio (DashScope) or another OpenAI-compatible gateway |\n| Base URL | Defaults to `https://dashscope-intl.aliyuncs.com/compatible-mode/v1` |\n\nThe credential's **Test** button calls `GET /models`.\n\n## Choosing a model — IMPORTANT\n\nThis node **always** sends `response_format: {\"type\": \"json_schema\", \"strict\": true}`. Per the [Alibaba documentation](https://www.alibabacloud.com/help/en/model-studio/qwen-structured-output), JSON Schema mode is supported only by:\n\n- the `qwen3.7-plus` series\n- the `qwen3.7-max` series\n- the `qwen3.8-max` series\n\nEvery other model (`qwen-turbo`, `qwen-plus`, `qwen-max`, and the older aliases) supports `json_object` at best and will answer this node with a **400**. The dropdown still lists them, marked *\"may reject\"*; embedding, image, and speech models are hidden entirely because they cannot serve a `chat/completions` call.\n\n## Usage\n\nDrag the **Qwen Structured Data Extractor** node onto the canvas, attach the credential, then fill in the parameters below.\n\n## Parameters\n\n- **Model Name or ID** — loaded from `/models`. Switch the field to Expression mode to use an ID that isn't listed.\n- **System Prompt** — what you want the model to do.\n- **User Input / Conversation History** — an expression pointing at the conversation, e.g. `{{ $json.chat_log }}`.\n- **JSON Schema Output** — the schema the output must conform to.\n\n### Options\n\n| Option | Default | Effect |\n| --- | --- | --- |\n| Auto Ensure JSON Keyword | `true` | Appends the word \"JSON\" to the system prompt. Required by `json_object` mode; `json_schema` mode does not need it. |\n| Disable Thinking Mode | `true` | Sends `enable_thinking: false`. DashScope **rejects** non-streaming calls to Qwen3 reasoning models without it, and thinking mode makes JSON output less reliable. Turn off only if a model rejects the parameter. |\n| Include Execution Trace | `false` | Adds a `meta` key with per-step durations and the token breakdown. If your schema already has a `meta` field, the trace moves to `_meta` instead of overwriting it. |\n| Include Raw Request/Response | `false` | Adds the outgoing payload and raw response to `meta`. Only applies when Include Execution Trace is on. |\n| Output Key Name | *(empty)* | Wraps the extracted data in a single key instead of emitting it flat. **Required** if your schema's root is an array. |\n| Schema Name | `extracted_data` | Identifier for the schema inside the API payload. |\n| Temperature | `0` | Keep at 0 for consistent extraction. |\n\n## Output\n\nBy default, exactly the fields in your schema:\n\n```json\n{ \"amount\": 2, \"size\": \"L\", \"phone\": \"0900...\" }\n```\n\nToken counts are deliberately **kept out** of the output so the item shape stays valid under `additionalProperties: false`. Read them from the output pane summary instead:\n\n```\n2/2 items in 2.4s | ~1087 tokens (prompt 912 / completion 175) | 640 cached\n```\n\nTurn on **Include Execution Trace** to get `meta.tokens` for cost accounting.\n\n## Qwen-specific tuning notes\n\n- **Don't put per-item expressions in the System Prompt.** DashScope's implicit context cache matches on a shared *prefix* (≥1024 tokens, ~2000 for Qwen3.7) and bills cache hits at 10%. The system prompt must be identical across items for the cache to hit — everything that varies belongs in User Input.\n- **The node never sends `max_tokens`.** Alibaba's docs state it truncates the JSON mid-output when structured output is on. This is deliberate — don't add it.\n- **Strict mode:** Alibaba *recommends* `additionalProperties: false` and listing fields in `required`. The node warns when they're absent but still runs.\n- **Thinking models can leak reasoning into `content`.** The node strips prose around the JSON automatically, but leaving **Disable Thinking Mode** on is the reliable fix.\n\n## Troubleshooting\n\n| Symptom | Cause |\n| --- | --- |\n| 400 mentioning `enable_thinking` | The model requires this parameter on non-streaming calls. Turn on **Disable Thinking Mode**. |\n| 400 mentioning `response_format` / `json_schema` | The model does not support strict JSON Schema. Switch to `qwen3.7-plus`, `qwen3.7-max`, or `qwen3.8-max`. |\n| 400 `messages must contain the word json` | The system prompt lacks the word \"json\". Turn on **Auto Ensure JSON Keyword**. |\n| `Qwen returned no content` | Empty response — a content filter, or the model replied in `reasoning_content`. The error message names the cause. |\n| `Qwen returned an array at the top level` | Your schema's root is an array. Set **Output Key Name** to wrap it. |\n| `\"User Input / Conversation History\" is empty` | The expression doesn't point at the field holding the conversation. |\n| `No model selected` | Open the dropdown and pick a model — the node ships no default. |\n| JSON parse failure with `finish_reason=length` | The output was cut off. Shorten the input or simplify the schema. |\n| Credential doesn't appear | Restart n8n after updating the package. |\n\n## Development\n\n```bash\nnvm use                # Node >= 22.16, see .nvmrc\nnpm install\nnpm run dev            # n8n at http://localhost:5678, hot reload\nnpm run build\nnpm test\nnpm run lint\n```\n\n> Node < 22.12 makes `n8n-node build/lint/dev` fail with `ERR_REQUIRE_ESM` — that's why `engines` and `.nvmrc` exist.\n\n## License\n\n[MIT](LICENSE)\n","readmeFilename":"README.md"}