> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://respan.ai/docs/integrations/gateway/n-8-n/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://respan.ai/_mcp/server. # n8n (gateway) > Call the Respan gateway from an n8n workflow with the built-in HTTP Request node. n8n can call Respan's OpenAI-compatible Chat Completions route from a workflow. In this path, n8n is the caller/orchestrator; it is not an upstream model provider, and Respan Gateway does not execute the n8n workflow. Gateway request logging and n8n native execution tracing are separate. Use this page for model requests, and add the [n8n tracing integration](/docs/integrations/n-8-n) when you also need the surrounding workflow, node, Agent, tool, and memory tree. ## Setup #### Add an HTTP Request node Configure n8n's built-in **HTTP Request** node with: * **Method:** `POST` * **URL:** `https://api.respan.ai/api/chat/completions` * **Authentication:** a bearer header backed by an n8n credential or secret * **Header:** `Authorization: Bearer YOUR_RESPAN_API_KEY` * **Header:** `Content-Type: application/json` * **Body content type:** JSON Do not paste a long-lived API key into an exported workflow definition. #### Send a chat request ```json { "model": "gpt-5.5", "messages": [ { "role": "user", "content": "Summarize this workflow result in one sentence." } ] } ``` The output is an OpenAI-compatible Chat Completions response. Downstream n8n nodes can read the assistant content from `choices[0].message.content`. #### Use a managed prompt (optional) For a new integration, use prompt schema v2. The prompt supplies the managed system/context layer and the body messages supply the runtime user turn: ```json { "model": "gpt-5.5", "messages": [ { "role": "user", "content": "Summarize this workflow result." } ], "prompt": { "prompt_id": "YOUR_PROMPT_ID", "schema_version": 2, "variables": { "language": "English" } } } ``` Omit `version` to use the deployed version, set a number to pin a committed version, or use `"latest"` for the newest draft. See [advanced prompt configuration](/docs/documentation/features/prompt-management/advanced). #### Inspect the request Open the [Logs page](https://platform.respan.ai/platform/requests). Gateway logging is independent of whether native n8n tracing is enabled. ## Migrating from the archived community node `@respan/n8n-nodes-respan@1.0.0` registered a Respan workflow node and UI credential. Its implemented operations called Gateway Chat Completions and loaded prompt/version/variable options, but the published build hard-codes the retired `https://api.respan.co/api` host. It is not a tracing exporter. The HTTP Request node is not an in-place npm-package replacement: existing workflows still reference the community node type and credential. Inventory and back up those workflows first, recreate each Standard or managed-prompt call with the current request shapes above, verify downstream response/error expressions, and only then remove the archived package when no workflow references it. ### Legacy feature map | Archived Respan node | HTTP Request migration | | ---------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Saved `respanApi` credential | Store the same Respan API key in an n8n bearer/header credential or deployment secret and send it as `Authorization: Bearer ...`. Tracing's OTLP header does not authenticate this workflow node. | | Standard model, system message, and messages | Send `model` and `messages`; place the system message first with `role: "system"`. Preserve expressions that read values from each input item. | | Prompt ID, version, and variables | Use the nested schema-v2 `prompt` object shown above. Put `version` inside `prompt` only when pinning a committed version or intentionally selecting `"latest"`. | | `override` and override-parameter JSON | Do not copy schema-v1 behavior blindly. Use schema v2 and map non-message overrides to `prompt.patch`; review message append/replace behavior against the [advanced prompt guide](/docs/documentation/features/prompt-management/advanced). | | `metadata`, `custom_identifier`, `customer_identifier`, `customer_params`, `request_breakdown` | Keep these as top-level Respan Gateway fields in the JSON body. They are Gateway request parameters, not n8n tracing configuration. | | Raw response per input item | Update downstream expressions for the HTTP Request output, including `choices[0].message.content`, and test multiple input items. | | Continue-on-fail output | Configure n8n's error behavior deliberately and verify the exact error item consumed downstream; the archived node returned a simplified `{ "error": "..." }` item. | | `stream` | Do not copy `stream: true` until the workflow has explicit SSE handling and a tested downstream chunk contract. | The archived prompt/version/variable dropdowns and `usableAsTool` node UI do not have a one-for-one HTTP Request replacement. If those experiences are required, keep the archived node installed until a maintained community-node release is available and the affected workflows have been tested against it. A maintained Gateway node can coexist with `@respan/instrumentation-n8n` because model execution and native tracing are separate concerns. ## Limitations * A generic HTTP Request execution is represented by native n8n tracing as a workflow/task span. The instrumentation cannot reconstruct its request body into a detailed LLM span. * Gateway request logs and the surrounding native n8n trace are separate evidence unless end-to-end trace-context linkage is explicitly implemented and verified. * Store the Respan API key in an n8n credential or deployment secret and review workflow exports before sharing them. See the [Respan Gateway API guide](/docs/integrations/gateway/respan-api) for supported request parameters and model guidance. > Call the Respan gateway from an n8n workflow with the built-in HTTP Request node.