Skip to main content
View source

n8n

View as Markdown

A RocketRide node that invokes an n8n webhook from pipeline lanes or gives an agent controlled access to an n8n instance. Pick it when an existing n8n workflow is the right automation boundary rather than rebuilding that flow on the RocketRide canvas.

About n8n

n8n is a workflow-automation product that connects services and custom logic through executable workflows. It can expose a workflow through webhooks and a public API; this node uses those interfaces from RocketRide.

What it does

Connects a RocketRide pipeline to n8n workflow automation. It's a dual node:

  • Pipeline step — lane input is POSTed to a workflow's webhook and the workflow's response flows out to the next node.
  • Agent tool — an agent can trigger workflows and inspect workflows/executions at runtime.

n8n is self-hosted, so you configure your instance's Base URL and (for listing/polling) a public API key.

Lanes

Lanes:

Lane inLane outDescription
texttextSends text to the configured workflow and emits its result
textanswersSends text to the configured workflow and emits its result
texttableSends text to the configured workflow and emits its result
questionsanswersSends question text to the workflow and emits its result
questionstextSends question text to the workflow and emits its result
questionstableSends question text to the workflow and emits its result
documentsdocumentsSends documents to the configured workflow and emits its result
documentstextSends documents to the configured workflow and emits its result
documentstableSends documents to the configured workflow and emits its result
imageimageSends binary input as multipart and emits returned image data
imagetextSends binary input as multipart and emits a text result
imageanswersSends binary input as multipart and emits an answer result
imagetableSends binary input as multipart and emits a structured result
audioaudioSends binary input as multipart and emits returned audio data
audiotextSends binary input as multipart and emits a text result
audioanswersSends binary input as multipart and emits an answer result
audiotableSends binary input as multipart and emits a structured result
videovideoSends binary input as multipart and emits returned video data
videotextSends binary input as multipart and emits a text result
videoanswersSends binary input as multipart and emits an answer result
videotableSends binary input as multipart and emits a structured result

Structured (payloadMode: structured) and binary requests preserve document boundaries/metadata and file bytes; a table listener receives structured (dict/list) results.

The accumulated input is sent to the configured Workflow (webhook path) as JSON {"data": "<input>"}. The webhook response is emitted to whichever output lanes are connected.

As a tool

Exposes these functions to an agent (namespaced under n8n):

FunctionDescription
n8n.trigger_workflowTrigger a workflow by its webhook path; returns the response
n8n.list_workflowsList workflows (id, name, active, webhook paths) — needs API key
n8n.get_workflowGet one workflow by id — needs API key
n8n.list_executionsList recent executions (status, timestamps) — needs API key
n8n.get_executionGet one execution by id, with data — needs API key
n8n.activate_workflowActivate a workflow (blocked in read-only mode) — needs API key
n8n.deactivate_workflowDeactivate a workflow (blocked in read-only mode) — needs API key

The agent never chooses the host — every request targets the configured Base URL — and workflow arguments are sanitized to a plain webhook path.

Tool calls return a success flag and an error message on validation or API failure. trigger_workflow uses its optional workflow argument or the configured workflow, and get_workflow, get_execution, activate_workflow, and deactivate_workflow each require an id.

Configuration

Configure the Base URL and the webhook path first. The default synchronous, simple-payload setup suits a workflow that returns one response; most other fields can remain at their defaults.

Payload shape and result mode

Use structured payloads when the workflow needs separate document content and metadata; the default simple mode flattens input into one data string for compatibility. Sync waits for the webhook response and should be paired with a response-producing workflow. Choose async for a long run: it polls the public API and therefore requires the API key. Raise the matching timeout only when the workflow genuinely needs longer than the 30-second sync or 120-second async defaults.

Authentication and write access

Webhook authentication is independent of the public API key. Match it to the target Webhook node, supplying the relevant header, basic credentials, or bearer/JWT token only for its selected mode. Keep TLS verification enabled unless a self-signed local HTTPS instance requires otherwise. Read-only mode is on by default; disable it only when the agent is explicitly allowed to activate or deactivate workflows.

Notes

Setup

  • Triggering is webhook-only. The target workflow needs a Webhook trigger node. Manual/cron/event-triggered workflows can't be triggered over HTTP directly — wrap them with a webhook dispatcher (Execute Sub-Workflow); see the n8n integration guide.
  • Activate the workflow. A production webhook (/webhook/...) only exists once the workflow is activated/published in n8n — otherwise the call 404s and the node tells you to activate it. While editing, set test_mode to use the editor's one-shot /webhook-test/... route.
  • Return a result. For sync mode, the workflow must end in a "Respond to Webhook" node (or set the Webhook node to respond when the last node finishes); otherwise n8n only returns a "workflow started" ack and the node warns you.
  • Docker reachability. If RocketRide runs in a container, localhost points at the container, not your machine. Use http://host.docker.internal:5678 (Docker Desktop, or add extra_hosts: ["host.docker.internal:host-gateway"] on Linux), or run n8n on the same Docker network and use http://n8n:5678. The node detects this and suggests the fix.

Round-trips (n8n → RocketRide)

The reverse direction needs no special node: any RocketRide pipeline with a webhook/chat/dropper source is HTTP-callable from n8n's HTTP Request node, enabling RR→n8n→RR round-trips. See the n8n integration guide and the templates examples/n8n-roundtrip.pipe + examples/n8n-call-rocketride.workflow.json.

Environment variables

Either set fields in the node config or use env vars:

ROCKETRIDE_N8N_URL=http://localhost:5678
ROCKETRIDE_N8N_KEY=... # n8n public API key

Upstream docs

Schema

FieldTypeDescriptionDefault
tool_n8n.apiKeystringAPI Key (X-N8N-API-KEY)
n8n public API key. Needed only to list/inspect workflows and poll executions — not for triggering webhooks.
""
tool_n8n.asyncTimeoutintegerExecution timeout (seconds)
Max seconds to wait for an async execution to finish before raising an error.
120
tool_n8n.baseUrlstringn8n Base URL
Base URL of your n8n instance, e.g. http://localhost:5678 or https://n8n.example.com. If RocketRide runs in Docker, use http://host.docker.internal:5678 (or the n8n container name) — 'localhost' would point at the container.
"http://localhost:5678"
tool_n8n.modestringResult mode
Sync requires the workflow to end in a 'Respond to Webhook' node. Async polls the execution via the public API (API key required).
"sync"
tool_n8n.payloadModestringPayload shape (pipeline step)
How lane input is sent to the workflow. 'structured' preserves document boundaries + metadata; 'simple' (default) flattens to a single string for back-compat.
"simple"
tool_n8n.readOnlybooleanRead-only mode
When ON, write operations (activate/deactivate workflow) are blocked.
true
tool_n8n.syncTimeoutintegerResponse timeout (seconds)
Max seconds to wait for the webhook response in sync mode (raise for slow workflows).
30
tool_n8n.verifyTlsbooleanVerify TLS certificate
Leave ON. Disable only for a self-signed local n8n served over HTTPS.
true
tool_n8n.webhookAuthstringWebhook auth
Authentication on the workflow's Webhook node. Separate from the API key above.
"none"
tool_n8n.webhookHeaderNamestringHeader name
Header name (when Webhook auth = Header auth).
""
tool_n8n.webhookHeaderValuestringHeader value
Header value (when Webhook auth = Header auth).
""
tool_n8n.webhookPasswordstringPassword
Password (when Webhook auth = Basic auth).
""
tool_n8n.webhookTokenstringToken
Token sent as 'Authorization: Bearer ' (when Webhook auth = Bearer token or JWT).
""
tool_n8n.webhookUserstringUsername
Username (when Webhook auth = Basic auth).
""
tool_n8n.workflowstringWorkflow (webhook path)
The webhook path the target workflow listens on (set on its Webhook node). Used by the pipeline step and as the default for the trigger tool.
""

Dependencies

  • requests >=2.34.2
  • idna >=3.10