Use this when connecting services with n8n workflows.
n8n
n8n is a self-hostable, node-based workflow automation tool that connects APIs and services visually, with triggers, data transformation, branching and code nodes, similar to Zapier but under your control.
1. n8n: workflow automation with nodes, triggers, credentials, expressions.
2. Self-hosted or cloud.
3. Secure credentials (encryption key).
4. Queue mode for scale.
5. Back up database and encryption key.
trigger → nodes → actions → execution log
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Target-state verification ladder Verify boundary
n8n uses a strict target-state ladder for workflow node execution and downstream effect: request accepted → job/task succeeded → target object changed → effective runtime state confirmed → original workload verified.
Step 2 Verification path Verify boundary
Run a pinned fixture through the workflow and inspect execution data node by node, including item counts, expression values and branch decisions. Exercise an expected error path and a duplicate/retry scenario for side-effect nodes. Confirm webhook/schedule trigger identity and credentials, then query the external system changed by the workflow. For production debugging, use the saved execution ID to correlate each node attempt instead of re-running blindly.
Step 3 Where it fails Narrow the fault
Separate trigger/webhook delivery, n8n orchestration, expression/data transformation, credential resolution, node implementation, external API and final target state. Data-shape errors differ from authentication failures, rate limits or downstream asynchronous failures. Do not simply retry a side-effect node after an ambiguous timeout; inspect the target and execution history first. Remediation should preserve the failing execution for comparison.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
Subtopics
Go one level deeper into this subject.
n8n fundamentals: a self-hostable workflow tool where a trigger starts a flow of nodes that pass JSON items, with expressions, code nodes and hundreds of integrations.
Subtopic Workflowsn8n workflows connect trigger and action nodes into an automated flow, saved as JSON, activated to run on their triggers and visible with execution history.
Subtopic Nodesn8n nodes are the building blocks of a workflow, each a trigger, an app integration, a data transformation or a code step, passing items from one to the next.
Subtopic Triggersn8n triggers start workflows on events, such as a webhook call, schedule, new email, form submission or an app event like a new GitHub issue.
Subtopic Webhooksn8n webhooks expose an HTTP endpoint that starts a workflow when called, with test and production URLs, authentication options and configurable responses.
Subtopic Credentialsn8n credentials store API keys, OAuth tokens and passwords encrypted in the database, selected in nodes so secrets never appear in workflow JSON or exports.
Subtopic Expressionsn8n expressions are JavaScript snippets in {{ }} that read data from previous nodes, such as {{ $json.email }} or {{ $('HTTP Request').item.json.id }}, to build dynamic values.
Subtopic VariablesVariables in n8n store reusable values such as base URLs at instance level, referenced as $vars.name, alongside workflow static data and expression variables.
Subtopic BranchingBranching in n8n uses the IF and Switch nodes to send items down different paths based on conditions, merging them later with the Merge node if needed.
Subtopic Error Workflowsn8n error workflows are separate workflows that start with the Error Trigger and run when another workflow fails, sending alerts with the workflow name, node and error message.
Subtopic SchedulingScheduling in n8n uses the Schedule Trigger node with intervals or cron expressions to start workflows automatically, respecting the instance's configured time zone.
Subtopic n8n TroubleshootingTroubleshoot n8n by opening the failed execution and inspecting each node's input and output, checking credentials, expression errors, webhook test versus production URLs and the server logs.
- Credentials are stored encrypted in n8n.
- Use error workflows for alerts.
- Test and production webhook URLs differ.
curl -sS https://<n8n>/healthz— health- Workflow list and active state — inventory
- Credentials and execution data retention — security
ReferenceWhy it matters1 section · depth on demand
In depth
n8n is a workflow automation tool with a visual editor: workflows are graphs of nodes (triggers, API calls, code, logic) that pass JSON items between them. It is self-hostable and has hundreds of integrations.
| Use case | Example |
|---|---|
| Glue between SaaS tools | Ticket created → post to Teams |
| Webhook processing | Receive alert, enrich, open incident |
| Scheduled reports | Query API, build summary, email |
| Light orchestration | Call Ansible/AWX API and track result |
For production use, run it with an external database, encrypted credentials, version-controlled workflow exports and restricted access to the editor.
ReferenceImportant terms & boundaries1 section · depth on demand
Mechanics
n8n executes workflows as connected nodes that transform items, call services and control branching. Node parameters, expressions, credentials, binary/item data and execution mode determine runtime behavior. A canvas connection shows topology, not necessarily the semantic contract of data entering each node. Some nodes can emit multiple items, wait for external events or perform side effects, so execution success at one node does not show downstream completion or idempotency.
ReferenceConfiguration & state1 section · depth on demand
Lifecycle
Keep workflow exports or source-controlled definitions, document credential ownership and environment variables, and review node/version changes before promotion. Separate test and production webhooks/credentials, define execution-data retention, and ensure queue/worker mode capacity if used. Reusable sub-workflows should have input/output contracts. Changes to expressions or item shapes need fixtures because upstream schema drift can silently alter downstream routing.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in > n8n. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.n8n.io/workflows/ · confidence 94%Quick lookup tables
Automation → n8n · operational reference
Context-specific ownership, verification, output and failure-boundary lookup for Automation → n8n.
| Layer | Automation → n8n operational reference |
|---|---|
| Runtime/ownership | n8n workflow automation · identify controller/parser, durable intent, identity and target ownership before mutation |
| Persistent intent | Versioned definition/configuration with explicit dependencies, scope and credential boundary |
| Verification | Export/inspect the workflow JSON, execute with pinned input, inspect execution data per node, then verify the external target independently. |
| Expected interpretation | The intended workflow version runs with the expected credentials and node parameters, each node receives/emits the expected items, and external side effects are independently verified. |
| Recovery boundary | Preserve correlation IDs + pre-state, repair first failing boundary, then verify the target independently |
Deep reference
Healthy vs suspicious evidence
Output interpretation
Capture workflow ID/version, execution ID, trigger, node names/types/versions, item counts, branch taken, per-node status/duration, external request IDs and final target identifiers. Redact credentials and sensitive payload fields while preserving safe schema/keys. A successful n8n execution is a controller result; retain external API responses and independent read-back for changes that matter.