n8n + Qwen on Yamify
This guide shows how to use n8n with Yamify-hosted Qwen to build AI workflows (summarization, extraction, customer support bots, etc.) without running your own model server.
Prereqs
- A Yamify workspace with n8n installed.
- A Yamify API key (used for Yamify Inference + other APIs).
- Create it in
Dashboard → Settings → API → Generate API key.
- Create it in
1) Verify your Yamify inference is working
First confirm your key works with the lightweight ping endpoint:
export YAMIFY_API_KEY="yamify_sk_..."
curl -sS https://www.yamify.co/api/inference/v1/ping \
-H "authorization: Bearer $YAMIFY_API_KEY" | jq .
Expected: a JSON response (HTTP 200).
2) Create an n8n workflow that calls Qwen
In n8n:
- Create a new workflow
- Add an HTTP Request node
- Set:
- Method:
POST - URL:
https://www.yamify.co/api/inference/v1/chat/completions - Headers:
content-type: application/jsonauthorization: Bearer {{$env.YAMIFY_API_KEY}}
- Body (JSON):
- Method:
{
"model": "yamify/qwen",
"stream": false,
"messages": [
{ "role": "system", "content": "You are a helpful assistant." },
{ "role": "user", "content": "Summarize this in 3 bullets: {{$json.text}}" }
],
"temperature": 0.2,
"max_tokens": 256
}
- Add a Set node (or any data source) that provides
text. - Run the workflow and inspect the HTTP node output.
Import a ready-made workflow (optional)
- GitHub: https://github.com/yamify-org/yamify/tree/main/examples/n8n-qwen
- File:
workflow-yamify-qwen.json
3) Store the API key in n8n safely
Inside n8n, prefer using an environment variable (recommended) instead of hardcoding:
- Set
YAMIFY_API_KEYas an env var for your n8n app in Yamify - Then reference it in the header:
Bearer {{$env.YAMIFY_API_KEY}}
Notes: streaming vs non-streaming
stream: falsereturns one JSON payload.stream: truereturns server-sent events (SSE). n8n can consume SSE, but for first workflows it’s simpler to start withstream: false.
Troubleshooting
- 401/403: your key is missing or invalid.
- Timeouts: reduce
max_tokens, or switch tostream: truefor faster first bytes. - Unexpected output format: enforce a strict format in your system prompt (e.g., “return JSON only”), and validate in the next node.