askill
n8n-api

n8n-apiSafety 90Repository

Manage n8n automation workflows via REST API. List/create/update/delete workflows, trigger executions, check execution status, manage tags, variables, credentials, and trigger webhooks. Use for workflow automation, orchestration, and n8n instance management.

0 stars
1.2k downloads
Updated 1/27/2026

Package Files

Loading files...
SKILL.md

n8n API Skill

Manage n8n automation workflows via the REST API.

Setup

  1. Install Bun (if not already installed):

    # Linux/macOS
    curl -fsSL https://bun.sh/install | bash
    
    # Windows (PowerShell)
    powershell -c "irm bun.sh/install.ps1 | iex"
    
  2. Get your API key: Settings → API → Create API Key

  3. Set environment variables:

    export N8N_BASE_URL="https://your-instance.app.n8n.cloud/api/v1"  # or http://localhost:5678/api/v1
    export N8N_API_KEY="your-api-key"
    

Quick Reference

Use the TypeScript script with Bun (cross-platform):

TaskCommand
List workflowsbun scripts/n8n.ts workflows list
Get workflowbun scripts/n8n.ts workflows get <id>
Activate workflowbun scripts/n8n.ts workflows activate <id>
Deactivate workflowbun scripts/n8n.ts workflows deactivate <id>
List executionsbun scripts/n8n.ts executions list [--workflow <id>] [--status <status>]
Get executionbun scripts/n8n.ts executions get <id>
Retry executionbun scripts/n8n.ts executions retry <id>
Trigger webhookbun scripts/n8n.ts webhook <path> '<json-data>'
List tagsbun scripts/n8n.ts tags list
List variablesbun scripts/n8n.ts variables list

API Endpoints

Workflows

  • GET /workflows — List all workflows
  • POST /workflows — Create workflow
  • GET /workflows/{id} — Get workflow details
  • PUT /workflows/{id} — Update workflow
  • DELETE /workflows/{id} — Delete workflow
  • POST /workflows/{id}/activate — Activate workflow
  • POST /workflows/{id}/deactivate — Deactivate workflow

Executions

  • GET /executions — List executions (supports ?workflowId=, ?status=)
  • GET /executions/{id} — Get execution details
  • DELETE /executions/{id} — Delete execution
  • POST /executions/{id}/retry — Retry failed execution

Tags

  • GET /tags — List tags
  • POST /tags — Create tag
  • PUT /tags/{id} — Update tag
  • DELETE /tags/{id} — Delete tag

Variables

  • GET /variables — List variables
  • POST /variables — Create variable
  • PUT /variables/{id} — Update variable
  • DELETE /variables/{id} — Delete variable

Credentials

  • POST /credentials — Create credential
  • PATCH /credentials/{id} — Update credential
  • DELETE /credentials/{id} — Delete credential
  • GET /credentials/schema/{typeName} — Get credential schema

Source Control

  • POST /source-control/pull — Pull from source control

Webhooks

Webhooks don't use API key auth — they have their own URL path:

curl -X POST "https://your-instance.app.n8n.cloud/webhook/<webhook-path>" \
  -H "Content-Type: application/json" \
  -d '{"key": "value"}'

Notes

  • Pagination: Use ?limit= and ?cursor= for large result sets
  • Rate limits: n8n Cloud has request limits; self-hosted has none by default
  • Execution statuses: success, error, waiting, running
  • API docs: https://docs.n8n.io/api/api-reference/

Workflow Editing Guidelines

When the user requests modifications to a workflow (not just listing or status changes), you should:

  1. Fetch the full workflow using bun scripts/n8n.ts workflows get <id> or GET /workflows/{id}
  2. Parse the JSON structure to understand the nodes, connections, and settings
  3. Make the requested changes directly to the workflow JSON
  4. Update the workflow using PUT /workflows/{id} with the modified JSON

Sticky Notes

When asked to add sticky notes, documentation, or annotations to a workflow:

{
  "type": "n8n-nodes-base.stickyNote",
  "name": "Sticky Note",
  "position": [x, y],
  "parameters": {
    "content": "Your note content here. Supports **markdown**.",
    "height": 200,
    "width": 300,
    "color": 1
  }
}

Sticky note colors: 1 (yellow), 2 (blue), 3 (pink), 4 (green), 5 (purple), 6 (gray), 7 (red)

Position sticky notes near the relevant nodes they describe. Read existing node positions to place notes appropriately.

Common Workflow Modifications

User RequestAction
"Add sticky notes to workflow X"Fetch workflow, analyze nodes, create stickyNote nodes with descriptions, update workflow
"Document workflow X"Fetch workflow, add sticky notes explaining each section/node group
"Rename nodes in workflow X"Fetch workflow, update node name fields, update workflow
"Add error handling to workflow X"Fetch workflow, add Error Trigger node and notification nodes
"Disable node Y in workflow X"Fetch workflow, set disabled: true on the node, update workflow

Workflow JSON Structure

{
  "id": "123",
  "name": "My Workflow",
  "active": true,
  "nodes": [
    {
      "id": "uuid",
      "name": "Node Name",
      "type": "n8n-nodes-base.someNode",
      "position": [x, y],
      "parameters": { ... },
      "disabled": false
    }
  ],
  "connections": {
    "Node Name": {
      "main": [[{ "node": "Next Node", "type": "main", "index": 0 }]]
    }
  },
  "settings": { ... }
}

Part of n8n Skills for Moltbot • Maintained by fazer.ai

Install

Download ZIP
Requires askill CLI v1.0+

AI Quality Score

96/100Analyzed 2/12/2026

An exceptionally well-structured skill for n8n API management. It combines clear setup instructions, a comprehensive command reference, and specific logic for agentic workflow manipulation, including JSON schemas for sticky notes and nodes.

90
98
90
98
95

Metadata

Licenseunknown
Version-
Updated1/27/2026
Publisherfazer-ai

Tags

apigithubgithub-actionssecurity