n8n

Run 2kw.ai extractions, prompts, document conversion, transcription and agents inside n8n workflows.

Overview

The n8n-nodes-2kw community node adds one 2kw node to n8n. Pick a resource and an operation, and the node calls the 2kw.ai API with your API key.

ResourceOperations
AgentSend Message, Decide Approval
SchemaGet
PromptGet, Compile, Resolve
ExtractionRun, Get, Estimate
DocumentConvert, Convert From Source
TranscriptionTranscribe

For chat completions, embeddings and n8n's AI Agent, use n8n's built-in OpenAI node against 2kw.ai instead. See Chat models.

Installation

In n8n, open Settings → Community Nodes → Install, enter n8n-nodes-2kw, accept the community-node prompt and confirm. The 2kw node then appears in the node picker.

Self-hosted n8n can also install it by hand: run npm install n8n-nodes-2kw inside ~/.n8n/custom/ and restart n8n.

Credentials

1

Create an API key

Open API Keys in the sidebar of the 2kw.ai dashboard and create a key. See API Keys.

2

Add the credential in n8n

Open Credentials → New → 2kw API and set:

  • Base URL: https://api.2kw.ai
  • API Key: the key from step 1

n8n tests the credential with GET /v1/models. If the test passes, the key is valid.

Agents

Agent → Send Message runs one turn of an agent and returns its answer as text, with status, responseId, conversationId, model and usage. Pass conversationId, or responseId as Previous Response ID, to continue a thread. Files from binary properties are uploaded and attached to the message.

n8n runs agents unattended. When an agent's policy wants a person to approve a tool call, the run pauses and the node fails with the waiting tools. To ask a person instead:

  1. Turn on Return Paused Runs in Send Message. A paused run comes out as an item with status: requires_action, its responseId and pendingApprovals.
  2. Route on a non-empty pendingApprovals with an IF node, not on status alone (a run waiting for a connector's question has the same status and is answered in chat), and ask a person with any Send-and-Wait node (Slack, email, Telegram).
  3. Pass the answer to Agent → Decide Approval with the same agent and label, the responseId, and Approve All or Reject All.

A run that needs a client-side tool fails, because n8n cannot execute one. The same holds for a connector that needs a person's own sign-in: the item fails, or with Return Paused Runs carries pendingConnections with a link for the person to connect. A connector that asks the user a question mid-call fails the item with the connector's label and the chat link to answer in, or with Return Paused Runs carries pendingInputs (inputRequestId, serverLabel, tool, mode, answerUrl); only the person who started the run answers it, in chat, and the run continues there.

Chat models

The 2kw.ai API is OpenAI-compatible, so n8n's own OpenAI node works against it. Create an OpenAI credential with:

  • Base URL: https://api.2kw.ai/v1
  • API Key: your 2kw.ai API key

Any n8n node that takes an OpenAI credential, such as Chat Model, Embeddings, AI Agent and Tools, then calls 2kw.ai. Use the provider/model form in the model field, for example openai/gpt-4o-mini.

Source

The node's source and changelog are in the n8n/ directory of the platform repository and are mirrored to github.com/2kw-ai/n8n-nodes-2kw.

Was this page helpful?