Skip to main content

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.

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:

  1. Create a new workflow
  2. Add an HTTP Request node
  3. Set:
    • Method: POST
    • URL: https://www.yamify.co/api/inference/v1/chat/completions
    • Headers:
      • content-type: application/json
      • authorization: Bearer {{$env.YAMIFY_API_KEY}}
    • Body (JSON):
{
"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
}
  1. Add a Set node (or any data source) that provides text.
  2. Run the workflow and inspect the HTTP node output.

Import a ready-made workflow (optional)

3) Store the API key in n8n safely

Inside n8n, prefer using an environment variable (recommended) instead of hardcoding:

  • Set YAMIFY_API_KEY as 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: false returns one JSON payload.
  • stream: true returns server-sent events (SSE). n8n can consume SSE, but for first workflows it’s simpler to start with stream: false.

Troubleshooting

  • 401/403: your key is missing or invalid.
  • Timeouts: reduce max_tokens, or switch to stream: true for 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.